Records that an organisation has acquired a marketplace app, and pins which version of it they are on. New rows start on the app's live branch and the head commit of that branch at the time of purchase, and the branch and commit are moved forward when the organisation takes an update, with the updated by and updated date showing who last did so.
Group: Database Entities
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| appRepository | AppRepository | The repository of the app that was purchased. |
| branch | Branch | The branch of the app the organisation is running, which is the app's live branch when the app is first purchased. It determines which release line updates come from. |
| commit | Commit | The exact version of the app the organisation is running, set to the head of the live branch at purchase time. It stays where it is until the organisation takes an update, so comparing it to the branch head tells you whether an update is available. |
| id | long | The database identifier of this purchase record. |
| purchasedBy | Profile | The profile that acquired the app for the organisation. |
| purchasedDate | Date | When the app was acquired, as a timestamp. It does not change when the app is later updated. |
| updatedBy | Profile | The profile that last changed which version of the app the organisation runs. Set to the purchaser when the app is first acquired. |
| updatedDate | Date | When the app version was last changed, as a timestamp. Set to the purchase date when the app is first acquired. |
Methods
getId() · getAppRepository() · setAppRepository(AppRepository appRepository) · setOrganisation(Organisation organisation) · getBranch() · setBranch(Branch branch) · getCommit() · setCommit(Commit commit) · getPurchasedBy() · setPurchasedBy(Profile purchasedBy) · getPurchasedDate() · setPurchasedDate(Date purchasedDate) · getUpdatedBy() · setUpdatedBy(Profile updatedBy) · getUpdatedDate() · setUpdatedDate(Date updatedDate)
getId()
Returns: long
The database identifier of this purchase record.
getAppRepository()
Returns: AppRepository
The repository of the app that was purchased.
setAppRepository(AppRepository appRepository)
Returns: void
Sets the repository of the app that was purchased.
| Parameter | Description |
|---|---|
appRepository | the purchased app's repository |
setOrganisation(Organisation organisation)
Returns: void
Sets the organisation that purchased the app.
| Parameter | Description |
|---|---|
organisation | the purchasing organisation |
getBranch()
Returns: Branch
The branch of the app the organisation is running, which is the app's live branch when the app is first purchased. It determines which release line updates come from.
setBranch(Branch branch)
Returns: void
Sets the branch of the app the organisation is running.
| Parameter | Description |
|---|---|
branch | the branch this organisation runs the app from |
getCommit()
Returns: Commit
The exact version of the app the organisation is running, set to the head of the live branch at purchase time. It stays where it is until the organisation takes an update, so comparing it to the branch head tells you whether an update is available.
setCommit(Commit commit)
Returns: void
Sets the exact version of the app the organisation is running.
| Parameter | Description |
|---|---|
commit | the commit of the app this organisation runs |
getPurchasedBy()
Returns: Profile
The profile that acquired the app for the organisation.
setPurchasedBy(Profile purchasedBy)
Returns: void
Sets the profile that acquired the app for the organisation.
| Parameter | Description |
|---|---|
purchasedBy | the purchasing profile |
getPurchasedDate()
Returns: Date
When the app was acquired, as a timestamp. It does not change when the app is later updated.
setPurchasedDate(Date purchasedDate)
Returns: void
Sets when the app was acquired.
| Parameter | Description |
|---|---|
purchasedDate | the date and time of purchase |
getUpdatedBy()
Returns: Profile
The profile that last changed which version of the app the organisation runs. Set to the purchaser when the app is first acquired.
setUpdatedBy(Profile updatedBy)
Returns: void
Sets the profile that last changed which version of the app the organisation runs.
| Parameter | Description |
|---|---|
updatedBy | the profile that last updated this purchase |
getUpdatedDate()
Returns: Date
When the app version was last changed, as a timestamp. Set to the purchase date when the app is first acquired.
setUpdatedDate(Date updatedDate)
Returns: void
Sets when the app version was last changed.
| Parameter | Description |
|---|---|
updatedDate | the date and time this purchase was last updated |