A single star rating and written review left by a profile against a marketplace item. Only one rating is kept per reviewer and marketplace item, so a reviewer changing their mind updates the existing row rather than adding another. The app repository, branch and commit record which published version of the app was being reviewed.
Group: Database Entities
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| appRepository | AppRepository | The app repository behind the marketplace listing that was reviewed. |
| branch | Branch | The branch of the app repository that was in use when the review was left, identifying which release line the reviewer was running. |
| commit | Commit | The exact commit of the app that was in use when the review was left, so an old review can be told apart from one of the current version. |
| id | long | The database identifier of this rating. |
| marketPlaceItem | MarketPlaceItem | The marketplace listing being rated. This is the entity the one-rating-per-reviewer rule applies to. |
| rating | int | The score the reviewer gave, as a whole number of stars. Stored as a plain int with no range enforced by the entity, so callers should validate it against whatever scale the marketplace UI presents. |
| review | String | The reviewer's written comments, limited to 2000 characters. Null or empty when the reviewer gave a score without writing anything. |
| reviewedBy | Profile | The profile that left this rating and review. Ratings are unique per reviewer and marketplace item. |
| reviewedOn | Date | When the review was written, as a timestamp. Ratings for an app are listed newest first by this value. |
Methods
getId() · getReviewedBy() · setReviewedBy(Profile reviewedBy) · getReviewedOn() · setReviewedOn(Date reviewedOn) · setOrganisation(Organisation organisation) · getMarketPlaceItem() · setMarketPlaceItem(MarketPlaceItem marketPlaceItem) · getAppRepository() · setAppRepository(AppRepository appRepository) · getBranch() · setBranch(Branch branch) · getCommit() · setCommit(Commit commit) · getRating() · setRating(int rating) · getReview() · setReview(String review)
getId()
Returns: long
The database identifier of this rating.
getReviewedBy()
Returns: Profile
The profile that left this rating and review. Ratings are unique per reviewer and marketplace item.
setReviewedBy(Profile reviewedBy)
Returns: void
Sets the profile that left this rating and review.
| Parameter | Description |
|---|---|
reviewedBy | the reviewing profile |
getReviewedOn()
Returns: Date
When the review was written, as a timestamp. Ratings for an app are listed newest first by this value.
setReviewedOn(Date reviewedOn)
Returns: void
Sets when the review was written.
| Parameter | Description |
|---|---|
reviewedOn | the date and time the review was left |
setOrganisation(Organisation organisation)
Returns: void
Sets the organisation the reviewer belongs to.
| Parameter | Description |
|---|---|
organisation | the reviewer's organisation |
getMarketPlaceItem()
Returns: MarketPlaceItem
The marketplace listing being rated. This is the entity the one-rating-per-reviewer rule applies to.
setMarketPlaceItem(MarketPlaceItem marketPlaceItem)
Returns: void
Sets the marketplace listing being rated.
| Parameter | Description |
|---|---|
marketPlaceItem | the marketplace item this rating is about |
getAppRepository()
Returns: AppRepository
The app repository behind the marketplace listing that was reviewed.
setAppRepository(AppRepository appRepository)
Returns: void
Sets the app repository behind the marketplace listing that was reviewed.
| Parameter | Description |
|---|---|
appRepository | the reviewed app's repository |
getBranch()
Returns: Branch
The branch of the app repository that was in use when the review was left, identifying which release line the reviewer was running.
setBranch(Branch branch)
Returns: void
Sets the branch of the app repository that was in use when the review was left.
| Parameter | Description |
|---|---|
branch | the reviewed branch |
getCommit()
Returns: Commit
The exact commit of the app that was in use when the review was left, so an old review can be told apart from one of the current version.
setCommit(Commit commit)
Returns: void
Sets the exact commit of the app that was in use when the review was left.
| Parameter | Description |
|---|---|
commit | the reviewed commit |
getRating()
Returns: int
The score the reviewer gave, as a whole number of stars. Stored as a plain int with no range enforced by the entity, so callers should validate it against whatever scale the marketplace UI presents.
setRating(int rating)
Returns: void
Sets the score the reviewer gave.
| Parameter | Description |
|---|---|
rating | the star rating given by the reviewer |
getReview()
Returns: String
The reviewer's written comments, limited to 2000 characters. Null or empty when the reviewer gave a score without writing anything.
setReview(String review)
Returns: void
Sets the reviewer's written comments.
| Parameter | Description |
|---|---|
review | the review text, at most 2000 characters, or null for none |