A single incentive awarded to a person, such as a gift voucher issued or an entry into a prize draw. Each entry points at the Reward which defines the incentive and at the profile it was awarded to, and records why and when it was given. Entries can require approval, in which case the approval status moves from PENDING to ACCEPTED, REJECTED or WINNER. Deletion is soft, via the deleted flag, so listings must exclude deleted entries.

Group: Database Entities

Implements: Serializable, Relational


Properties

PropertyReturnsDescription
adminOrgOrganisationThe administrative organisation which owns this entry, copied from the reward when the entry is created. Lookups by id check it so that one account cannot read another account's entries.
approvalStatusRewardEntryStatusWhere the entry sits in the approval process: PENDING while it awaits review, then ACCEPTED, REJECTED or WINNER. Null means the entry never needed approval and counts as accepted, so searches for accepted entries match null as well.
approvedDateDateWhen the entry was reviewed and its approval status decided. Null while the entry has not been reviewed.
attachmentHashStringContent hash of a file attached to the entry, such as a receipt or proof of purchase uploaded when claiming. Use it to read the file from the content store. Null when nothing was attached.
awardedDateDateDate and time the award was given. Listings are ordered by this, oldest first, and reporting date ranges filter on it. Never null.
awardedForModuleStatusThe module completion which earned this award, for rewards granted by finishing training. Optional, and null for awards which did not come from a module.
awardedToProfileThe user profile this has been awarded to. Always a person, never an organisation, and never null.
deletedBooleanSoft delete flag. Every finder ignores entries where this is set, so an entry with the flag set should be treated as gone even though the row still exists. Can be null, which means not deleted; the deleted method handles that.
extraField1StringFirst of three free-text slots for account specific data captured with the entry, such as an answer from a claim form. The platform gives them no meaning of their own.
extraField2StringSecond of three free-text slots for account specific data captured with the entry. The platform gives it no meaning of its own.
extraField3StringThird of three free-text slots for account specific data captured with the entry. The platform gives it no meaning of its own.
firstNameStringFirst name captured on the entry itself, for example from a claim form. This is a snapshot taken at entry time and can differ from the current name on the awarded profile.
idlongUnique database identifier for this reward entry.
quizSubmissionRewardQuizSubmissionThe quiz answers submitted to claim this entry, for rewards which are gated behind a quiz. Optional, and deleting the entry deletes the submission with it.
reasonStringTextual description of why the award was given, for example completed module 1. Shown to administrators and to the recipient, so write it for a reader rather than as a code. Never null.
relatedCartCartThe shopping cart this entry arose from, for awards that come out of an order. Null when the award has nothing to do with a cart.
relatedOrgOrganisationOrganisation the award relates to, for example the dealer or store the sale was made through. Optional, and separate from the admin organisation which owns the entry.
relatedProductSkuProductSkuThe specific product variant the award was earned on, for incentives tied to selling or registering a particular product. Optional.
rewardRewardThe reward which has been granted, holding the definition of the incentive and the organisation which runs it. Never null.
surNameStringSurname captured on the entry itself, for example from a claim form. Like the first name it is a snapshot and can differ from the current name on the awarded profile.

Methods

getId() · getRelatedOrg() · getRelatedProductSku() · getRelatedCart() · getFirstName() · getSurName() · getQuizSubmission() · getReward() · getAdminOrg() · getAwardedTo() · getAttachmentHash() · getAwardedFor() · getAwardedDate() · getReason() · getDeleted() · deleted() · getApprovedDate() · getApprovalStatus() · getExtraField1() · getExtraField2() · getExtraField3() · answersMap()

getId()

Returns: long

Unique database identifier for this reward entry.

getRelatedOrg()

Returns: Organisation

Organisation the award relates to, for example the dealer or store the sale was made through. Optional, and separate from the admin organisation which owns the entry.

getRelatedProductSku()

Returns: ProductSku

The specific product variant the award was earned on, for incentives tied to selling or registering a particular product. Optional.

getRelatedCart()

Returns: Cart

The shopping cart this entry arose from, for awards that come out of an order. Null when the award has nothing to do with a cart.

getFirstName()

Returns: String

First name captured on the entry itself, for example from a claim form. This is a snapshot taken at entry time and can differ from the current name on the awarded profile.

getSurName()

Returns: String

Surname captured on the entry itself, for example from a claim form. Like the first name it is a snapshot and can differ from the current name on the awarded profile.

getQuizSubmission()

Returns: RewardQuizSubmission

The quiz answers submitted to claim this entry, for rewards which are gated behind a quiz. Optional, and deleting the entry deletes the submission with it.

getReward()

Returns: Reward

The reward which has been granted, holding the definition of the incentive and the organisation which runs it. Never null.

getAdminOrg()

Returns: Organisation

The administrative organisation which owns this entry, copied from the reward when the entry is created. Lookups by id check it so that one account cannot read another account's entries.

getAwardedTo()

Returns: Profile

The user profile this has been awarded to. Always a person, never an organisation, and never null.

getAttachmentHash()

Returns: String

Content hash of a file attached to the entry, such as a receipt or proof of purchase uploaded when claiming. Use it to read the file from the content store. Null when nothing was attached.

getAwardedFor()

Returns: ModuleStatus

The module completion which earned this award, for rewards granted by finishing training. Optional, and null for awards which did not come from a module.

getAwardedDate()

Returns: Date

Date and time the award was given. Listings are ordered by this, oldest first, and reporting date ranges filter on it. Never null.

getReason()

Returns: String

Textual description of why the award was given, for example completed module 1. Shown to administrators and to the recipient, so write it for a reader rather than as a code. Never null.

getDeleted()

Returns: Boolean

Soft delete flag. Every finder ignores entries where this is set, so an entry with the flag set should be treated as gone even though the row still exists. Can be null, which means not deleted; the deleted method handles that.

deleted()

Returns: boolean

Whether the entry has been soft deleted, treating an unset flag as not deleted. Prefer this over reading the flag directly.

getApprovedDate()

Returns: Date

When the entry was reviewed and its approval status decided. Null while the entry has not been reviewed.

getApprovalStatus()

Returns: RewardEntryStatus

Where the entry sits in the approval process: PENDING while it awaits review, then ACCEPTED, REJECTED or WINNER. Null means the entry never needed approval and counts as accepted, so searches for accepted entries match null as well.

getExtraField1()

Returns: String

First of three free-text slots for account specific data captured with the entry, such as an answer from a claim form. The platform gives them no meaning of their own.

getExtraField2()

Returns: String

Second of three free-text slots for account specific data captured with the entry. The platform gives it no meaning of its own.

getExtraField3()

Returns: String

Third of three free-text slots for account specific data captured with the entry. The platform gives it no meaning of its own.

answersMap()

Returns: Map<String,String>

The quiz answers submitted with this entry as a map of question name to answer, or null when the entry has no quiz submission.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.