One participant's outcome for one recognition period, holding the value they achieved and the level they reached. There is at most one result per participant per period. The achieved value is the amount measured for them over the period on the topic's metric, the level value is the threshold of the level they reached, and the ranking is their position within the period. Points to award holds the most recently calculated points, which are only actually issued when the period is closed, and the award is the recognition award record created for them, which stays null while they have not reached any level.
Group: Database Entities
Implements: Serializable, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| achievedValue | BigDecimal | The amount the participant achieved over the period, measured on whatever the topic uses as its metric, such as sales value or points. Results are ranked by it, highest first. Can be null before the period has been calculated. |
| adminDomain | Organisation | The admin organisation, or tenant, which owns this result. Copied from the period it belongs to. Never null. |
| award | RecognitionAward | The award record granted to the participant for this period, which is what actually holds the badge or level they were given. Null while the result has not reached any level. |
| awardedTo | BaseEntity | The participant this result is for. It is a profile when individuals compete and an organisation when the programme is run between organisations, so it is typed as a base entity. Never null. |
| dataJson | String | Optional working data from the calculation, held as JSON text of up to 20,000 characters, so a report can show how the achieved value was arrived at. The platform does not interpret it. |
| id | long | Unique database identifier for this result. |
| levelValue | BigDecimal | The threshold of the level the participant reached, recorded as it stood when the level was given, so a later change to the level does not alter past results. Null if no level was achieved. |
| period | RecognitionPeriod | The recognition period this result covers, which supplies the start and end dates the value was measured over. Never null. |
| pointsBucket | Reward | The reward whose points system the points for this result are credited to when the period closes. Can be null if the period does not award points. |
| pointsToAward | Double | The most recently calculated number of points for this participant. They are not issued yet, and are only awarded into the points bucket when the period is closed. Can be null. |
| rank | Integer | The participant's position within the period. This is an alias for the ranking, kept for compatibility with earlier versions of the API. |
| ranking | Integer | The participant's position within the period, counting from the highest achieved value. Set to zero when the result is first created and filled in when the period is calculated. Never null. |
| recognition | BaseRecognition | The badge or level the participant reached in this period. Null while they have not reached one. |
| topic | RecognitionTopic | The recognition topic this result was measured on, which defines the metric behind the achieved value. Copied from the period. Never null. |
Methods
getId() · setId(long id) · getAdminDomain() · setAdminDomain(Organisation adminDomain) · getTopic() · setTopic(RecognitionTopic topic) · getRecognition() · setRecognition(BaseRecognition recognition) · getAward() · setAward(RecognitionAward award) · getAwardedTo() · setAwardedTo(BaseEntity awardedTo) · getPeriod() · setPeriod(RecognitionPeriod period) · getAchievedValue() · setAchievedValue(BigDecimal achievedValue) · getLevelValue() · setLevelValue(BigDecimal levelValue) · getRanking() · setRanking(Integer ranking) · getPointsToAward() · setPointsToAward(Double pointsToAward) · getPointsBucket() · setPointsBucket(Reward pointsBucket) · getDataJson() · setDataJson(String dataJson) · getRank()
getId()
Returns: long
Unique database identifier for this result.
setId(long id)
Returns: void
Sets the database identifier. The database assigns this when the result is first saved, so it is not normally set by hand.
| Parameter | Description |
|---|---|
id | the primary key to use |
getAdminDomain()
Returns: Organisation
The admin organisation, or tenant, which owns this result. Copied from the period it belongs to. Never null.
setAdminDomain(Organisation adminDomain)
Returns: void
Sets the admin organisation which owns this result.
| Parameter | Description |
|---|---|
adminDomain | the owning admin organisation |
getTopic()
Returns: RecognitionTopic
The recognition topic this result was measured on, which defines the metric behind the achieved value. Copied from the period. Never null.
setTopic(RecognitionTopic topic)
Returns: void
Sets the recognition topic this result was measured on.
| Parameter | Description |
|---|---|
topic | the recognition topic |
getRecognition()
Returns: BaseRecognition
The badge or level the participant reached in this period. Null while they have not reached one.
setRecognition(BaseRecognition recognition)
Returns: void
Sets the badge or level the participant reached in this period.
| Parameter | Description |
|---|---|
recognition | the recognition reached, or null if none was reached |
getAward()
Returns: RecognitionAward
The award record granted to the participant for this period, which is what actually holds the badge or level they were given. Null while the result has not reached any level.
setAward(RecognitionAward award)
Returns: void
Sets the award record granted to the participant for this period.
| Parameter | Description |
|---|---|
award | the award granted, or null if no level has been reached |
getAwardedTo()
Returns: BaseEntity
The participant this result is for. It is a profile when individuals compete and an organisation when the programme is run between organisations, so it is typed as a base entity. Never null.
setAwardedTo(BaseEntity awardedTo)
Returns: void
Sets the participant this result is for.
| Parameter | Description |
|---|---|
awardedTo | the profile or organisation the result belongs to |
getPeriod()
Returns: RecognitionPeriod
The recognition period this result covers, which supplies the start and end dates the value was measured over. Never null.
setPeriod(RecognitionPeriod period)
Returns: void
Sets the recognition period this result covers.
| Parameter | Description |
|---|---|
period | the recognition period |
getAchievedValue()
Returns: BigDecimal
The amount the participant achieved over the period, measured on whatever the topic uses as its metric, such as sales value or points. Results are ranked by it, highest first. Can be null before the period has been calculated.
setAchievedValue(BigDecimal achievedValue)
Returns: void
Sets the amount the participant achieved over the period.
| Parameter | Description |
|---|---|
achievedValue | the achieved value |
getLevelValue()
Returns: BigDecimal
The threshold of the level the participant reached, recorded as it stood when the level was given, so a later change to the level does not alter past results. Null if no level was achieved.
setLevelValue(BigDecimal levelValue)
Returns: void
Sets the threshold of the level the participant reached.
| Parameter | Description |
|---|---|
levelValue | the level threshold reached, or null if no level was achieved |
getRanking()
Returns: Integer
The participant's position within the period, counting from the highest achieved value. Set to zero when the result is first created and filled in when the period is calculated. Never null.
setRanking(Integer ranking)
Returns: void
Sets the participant's position within the period.
| Parameter | Description |
|---|---|
ranking | the ranking within the period |
getPointsToAward()
Returns: Double
The most recently calculated number of points for this participant. They are not issued yet, and are only awarded into the points bucket when the period is closed. Can be null.
setPointsToAward(Double pointsToAward)
Returns: void
Sets the number of points calculated for this participant, to be awarded when the period closes.
| Parameter | Description |
|---|---|
pointsToAward | the points due to be awarded |
getPointsBucket()
Returns: Reward
The reward whose points system the points for this result are credited to when the period closes. Can be null if the period does not award points.
setPointsBucket(Reward pointsBucket)
Returns: void
Sets the reward whose points system the points for this result are credited to.
| Parameter | Description |
|---|---|
pointsBucket | the points bucket to credit, or null if none |
getDataJson()
Returns: String
Optional working data from the calculation, held as JSON text of up to 20,000 characters, so a report can show how the achieved value was arrived at. The platform does not interpret it.
setDataJson(String dataJson)
Returns: void
Sets the optional calculation working data, as JSON text.
| Parameter | Description |
|---|---|
dataJson | the calculation data as JSON |
getRank()
Returns: Integer
The participant's position within the period. This is an alias for the ranking, kept for compatibility with earlier versions of the API.