Records that a badge or a level was awarded to a profile or an organisation. The recognition awarded is either a badge or a level, and the topic it belongs to acts as the folder grouping them. An award may belong to a recognition period, which is one run of the promotion the award was worked out for, and may link to the points record created if the recognition also issued points. Awards are soft deleted by setting the deleted date, which also clears the points link, so a deleted award is skipped by almost every finder while its row is kept for history.
Group: Database Entities
Implements: Serializable, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| adminDomain | Organisation | The organisation that owns this award and whose administrators manage it. Every finder is scoped to it, so an award is only ever visible within its own account. |
| awardedTo | BaseEntity | The profile or organisation the recognition was awarded to. Use asProfile or asOrg on the result to tell which of the two it is. |
| createdDate | Date | When the recognition was awarded. |
| deletedDate | Date | When this award was soft deleted. Almost every finder skips awards with a value here, so a deleted award no longer counts towards anything, and deleting also clears the link to any points it issued. |
| expiryDate | Date | When this award stops being current, for recognitions that only stand for a period. Null means it does not expire. Note that the finders do not filter on it, so check it yourself when only current awards are wanted. |
| id | long | Primary key of this award, assigned when it is first saved. |
| manuallyAwardedBy | Profile | The administrator who granted this award by hand. Null means it was worked out automatically, so this doubles as the marker of a manual award. |
| notes | String | Free-text notes recorded with the award, typically the reason a manual award was given. Limited to ten thousand characters. |
| period | RecognitionPeriod | The recognition period this award was worked out for, that is one run of the promotion behind the topic. Null for an award made outside any period, such as a badge given directly. |
| points | Points | The points record created when this award issued points to the recipient. Null when the recognition issues no points, and also cleared when the award is soft deleted. |
| recognition | BaseRecognition | The badge or level that was awarded. It carries the title, image and any points the recognition issues. |
| topic | RecognitionTopic | The topic the awarded recognition belongs to, which groups related badges and levels and, for levels, defines the metric they are based on. It is copied from the recognition when the award is created. |
Methods
getId() · getPeriod() · setPeriod(RecognitionPeriod period) · getAdminDomain() · setAdminDomain(Organisation adminDomain) · getRecognition() · setRecognition(BaseRecognition recognition) · getTopic() · setTopic(RecognitionTopic topic) · getCreatedDate() · setCreatedDate(Date createdDate) · getDeletedDate() · setDeletedDate(Date deletedDate) · getExpiryDate() · setExpiryDate(Date expiryDate) · getAwardedTo() · setAwardedTo(BaseEntity awardedTo) · getManuallyAwardedBy() · setManuallyAwardedBy(Profile manuallyAwardedBy) · getNotes() · setNotes(String notes) · getPoints() · setPoints(Points points)
getId()
Returns: long
Primary key of this award, assigned when it is first saved.
getPeriod()
Returns: RecognitionPeriod
The recognition period this award was worked out for, that is one run of the promotion behind the topic. Null for an award made outside any period, such as a badge given directly.
setPeriod(RecognitionPeriod period)
Returns: void
Sets the recognition period this award belongs to.
| Parameter | Description |
|---|---|
period | the recognition period, or null for none |
getAdminDomain()
Returns: Organisation
The organisation that owns this award and whose administrators manage it. Every finder is scoped to it, so an award is only ever visible within its own account.
setAdminDomain(Organisation adminDomain)
Returns: void
Sets the organisation that owns this award.
| Parameter | Description |
|---|---|
adminDomain | the owning organisation |
getRecognition()
Returns: BaseRecognition
The badge or level that was awarded. It carries the title, image and any points the recognition issues.
setRecognition(BaseRecognition recognition)
Returns: void
Sets the badge or level that was awarded.
| Parameter | Description |
|---|---|
recognition | the recognition awarded |
getTopic()
Returns: RecognitionTopic
The topic the awarded recognition belongs to, which groups related badges and levels and, for levels, defines the metric they are based on. It is copied from the recognition when the award is created.
setTopic(RecognitionTopic topic)
Returns: void
Sets the topic the awarded recognition belongs to.
| Parameter | Description |
|---|---|
topic | the recognition topic |
getCreatedDate()
Returns: Date
When the recognition was awarded.
setCreatedDate(Date createdDate)
Returns: void
Sets when the recognition was awarded.
| Parameter | Description |
|---|---|
createdDate | the award timestamp |
getDeletedDate()
Returns: Date
When this award was soft deleted. Almost every finder skips awards with a value here, so a deleted award no longer counts towards anything, and deleting also clears the link to any points it issued.
setDeletedDate(Date deletedDate)
Returns: void
Sets the soft deletion timestamp for this award.
| Parameter | Description |
|---|---|
deletedDate | the deletion timestamp, or null to make the award stand again |
getExpiryDate()
Returns: Date
When this award stops being current, for recognitions that only stand for a period. Null means it does not expire. Note that the finders do not filter on it, so check it yourself when only current awards are wanted.
setExpiryDate(Date expiryDate)
Returns: void
Sets when this award stops being current.
| Parameter | Description |
|---|---|
expiryDate | the expiry timestamp, or null if the award does not expire |
getAwardedTo()
Returns: BaseEntity
The profile or organisation the recognition was awarded to. Use asProfile or asOrg on the result to tell which of the two it is.
setAwardedTo(BaseEntity awardedTo)
Returns: void
Sets the profile or organisation the recognition was awarded to.
| Parameter | Description |
|---|---|
awardedTo | the recipient of the award |
getManuallyAwardedBy()
Returns: Profile
The administrator who granted this award by hand. Null means it was worked out automatically, so this doubles as the marker of a manual award.
setManuallyAwardedBy(Profile manuallyAwardedBy)
Returns: void
Sets the administrator who granted this award by hand.
| Parameter | Description |
|---|---|
manuallyAwardedBy | the granting administrator, or null for an automatic award |
getNotes()
Returns: String
Free-text notes recorded with the award, typically the reason a manual award was given. Limited to ten thousand characters.
setNotes(String notes)
Returns: void
Sets the free-text notes recorded with this award.
| Parameter | Description |
|---|---|
notes | the award notes, or null |
getPoints()
Returns: Points
The points record created when this award issued points to the recipient. Null when the recognition issues no points, and also cleared when the award is soft deleted.
setPoints(Points points)
Returns: void
Sets the points record created when this award issued points.
| Parameter | Description |
|---|---|
points | the points issued by this award, or null |