One run of a recognition programme for a topic, such as a monthly or quarterly award round. The linked Reward acts as the promotion that supplies the period's start and end dates and its eligibility rules, so a period has no dates of its own. Each participant's outcome for the period is held in a RecognitionPeriodResult. A period is published once interim results have been generated, and closed once it has been finalised and can no longer change.
Group: Database Entities
Implements: Serializable, Auditable
Properties
| Property | Returns | Description |
|---|---|---|
| adminDomain | Organisation | The organisation that owns this period, which scopes it to a single account. |
| auditOrg | Organisation | The organisation that audit entries for this period are written against, which is the admin domain that owns it. |
| closed | boolean | True once the period has been closed off and finalised, which is the case when a processed date has been set. A closed period's results no longer change. |
| deleted | boolean | True if this period has been soft deleted, which is the case when a deleted date has been set. |
| deletedDate | Date | When this period was soft deleted. Null for a live period. The finders on this class skip rows that have a value here, so a soft deleted period stays in the table but disappears from listings. |
| endDate | Date | The date the period closes, read from the promotion rather than stored on the period itself. Null if no promotion has been set yet. |
| id | long | The database identifier of this recognition period. |
| pastEndDate | boolean | True if the current server time is after the promotion's end date. Fails with a null pointer error if the period has no promotion, because it then has no end date to compare against. |
| pastStartDate | boolean | True if the current server time is after the promotion's start date, meaning the period has opened. Fails with a null pointer error if the period has no promotion. |
| processedDate | Date | When the period was closed off and its results finalised. Null while the period is still open and its results can still change. |
| promotion | Reward | The reward acting as the promotion behind this period. The promotion supplies the period's start and end dates and controls who is eligible, so a period cannot be saved without one. |
| published | boolean | True once interim results have been generated and saved for this period, which is the case when a published date has been set. Interim results can be published repeatedly while the period is still open. |
| publishedDate | Date | When interim results for this period were last generated and published. Null if interim results have never been published. |
| startDate | Date | The date the period opens, read from the promotion rather than stored on the period itself. Null if no promotion has been set yet. |
| topic | RecognitionTopic | The recognition topic this period belongs to. The topic acts as the folder for the badges or levels being awarded, and defines the metric the results are based on. |
Methods
getId() · getTopic() · setTopic(RecognitionTopic topic) · getPromotion() · setPromotion(Reward promotion) · getPublishedDate() · setPublishedDate(Date publishedDate) · getDeletedDate() · setDeletedDate(Date deletedDate) · getProcessedDate() · setProcessedDate(Date processedDate) · getAdminDomain() · getAuditOrg() · getStartDate() · getEndDate() · isClosed() · isPublished() · isPastEndDate() · isPastStartDate() · isDeleted()
getId()
Returns: long
The database identifier of this recognition period.
getTopic()
Returns: RecognitionTopic
The recognition topic this period belongs to. The topic acts as the folder for the badges or levels being awarded, and defines the metric the results are based on.
setTopic(RecognitionTopic topic)
Returns: void
Sets the recognition topic this period belongs to.
| Parameter | Description |
|---|---|
topic | the owning recognition topic |
getPromotion()
Returns: Reward
The reward acting as the promotion behind this period. The promotion supplies the period's start and end dates and controls who is eligible, so a period cannot be saved without one.
setPromotion(Reward promotion)
Returns: void
Sets the reward acting as the promotion behind this period, which supplies its dates and eligibility rules.
| Parameter | Description |
|---|---|
promotion | the promotion driving this period |
getPublishedDate()
Returns: Date
When interim results for this period were last generated and published. Null if interim results have never been published.
setPublishedDate(Date publishedDate)
Returns: void
Sets the date interim results for this period were last generated and published.
| Parameter | Description |
|---|---|
publishedDate | the date interim results were last published, or null for none |
getDeletedDate()
Returns: Date
When this period was soft deleted. Null for a live period. The finders on this class skip rows that have a value here, so a soft deleted period stays in the table but disappears from listings.
setDeletedDate(Date deletedDate)
Returns: void
Sets the soft delete date. Setting a value hides the period from the finders on this class.
| Parameter | Description |
|---|---|
deletedDate | the date this period was soft deleted, or null to make it live again |
getProcessedDate()
Returns: Date
When the period was closed off and its results finalised. Null while the period is still open and its results can still change.
setProcessedDate(Date processedDate)
Returns: void
Sets the date the period was closed off and its results finalised.
| Parameter | Description |
|---|---|
processedDate | the date this period was finalised, or null to reopen it |
getAdminDomain()
Returns: Organisation
The organisation that owns this period, which scopes it to a single account.
getAuditOrg()
Returns: Organisation
The organisation that audit entries for this period are written against, which is the admin domain that owns it.
getStartDate()
Returns: Date
The date the period opens, read from the promotion rather than stored on the period itself. Null if no promotion has been set yet.
getEndDate()
Returns: Date
The date the period closes, read from the promotion rather than stored on the period itself. Null if no promotion has been set yet.
isClosed()
Returns: boolean
True once the period has been closed off and finalised, which is the case when a processed date has been set. A closed period's results no longer change.
isPublished()
Returns: boolean
True once interim results have been generated and saved for this period, which is the case when a published date has been set. Interim results can be published repeatedly while the period is still open.
isPastEndDate()
Returns: boolean
True if the current server time is after the promotion's end date. Fails with a null pointer error if the period has no promotion, because it then has no end date to compare against.
isPastStartDate()
Returns: boolean
True if the current server time is after the promotion's start date, meaning the period has opened. Fails with a null pointer error if the period has no promotion.
isDeleted()
Returns: boolean
True if this period has been soft deleted, which is the case when a deleted date has been set.