Records that someone took up a referral, linking the Referral that invited them to the profile that accepted it. One acceptance is created each time a referral converts, capturing the signup log for the account that was created, and, where the referral is part of a promotion, the RewardEntry the acceptance counts towards. The organisation and referral programme are denormalised from the referral so acceptances can be queried without a join. An acceptance can later be activated, for example by the referred member making a purchase, which is what many referral rewards actually pay out on.
Group: Database Entities
Implements: Serializable, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| acceptedProfile | Profile | The member who took up the referral, ie the person who was referred. Never null for a persisted acceptance, and loaded lazily. |
| activatedDate | Date | When the acceptance was activated by the referred member doing something that qualifies, such as making a purchase. Null while the acceptance has not been activated. |
| createdDate | Date | When the referral was accepted. Never null. |
| id | long | The database identifier of this acceptance. |
| program | ReferralProgram | The referral programme the referral belongs to, denormalised from the referral. Null for a referral that is not part of a programme, and loaded lazily. |
| referral | Referral | The referral that was taken up, which identifies who did the referring. A referral that allows multiple acceptances can have several of these rows. Never null, and loaded lazily. |
| rewardEntry | RewardEntry | The reward entry this acceptance counts towards, when the referral is running as part of a promotion. Null otherwise. |
| signup | SignupLog | The signup that created the accepting member's account, when the referral was taken up by someone registering. Null when the acceptor already had an account. Loaded lazily. |
| status | String | Approval state of the acceptance where the programme requires one: A means approval is needed, R means it was rejected and OK means it was accepted. Up to 10 characters, and null when no approval step applies. |
| statusDate | Date | When the approval status was last changed. Null while the status has never been set. |
Methods
getId() · setOrganisation(Organisation organisation) · getAcceptedProfile() · setAcceptedProfile(Profile acceptedProfile) · getReferral() · setReferral(Referral referral) · getProgram() · setProgram(ReferralProgram program) · getSignup() · setSignup(SignupLog signup) · getCreatedDate() · setCreatedDate(Date createdDate) · getActivatedDate() · setActivatedDate(Date activatedDate) · getRewardEntry() · setRewardEntry(RewardEntry rewardEntry) · getStatus() · setStatus(String status) · getStatusDate() · setStatusDate(Date statusDate) · rowId()
getId()
Returns: long
The database identifier of this acceptance.
setOrganisation(Organisation organisation)
Returns: void
Sets the organisation the acceptance belongs to.
| Parameter | Description |
|---|---|
organisation | the owning organisation |
getAcceptedProfile()
Returns: Profile
The member who took up the referral, ie the person who was referred. Never null for a persisted acceptance, and loaded lazily.
setAcceptedProfile(Profile acceptedProfile)
Returns: void
Sets the member who took up the referral.
| Parameter | Description |
|---|---|
acceptedProfile | the member who accepted the referral |
getReferral()
Returns: Referral
The referral that was taken up, which identifies who did the referring. A referral that allows multiple acceptances can have several of these rows. Never null, and loaded lazily.
setReferral(Referral referral)
Returns: void
Sets the referral that was taken up.
| Parameter | Description |
|---|---|
referral | the referral that was accepted |
getProgram()
Returns: ReferralProgram
The referral programme the referral belongs to, denormalised from the referral. Null for a referral that is not part of a programme, and loaded lazily.
setProgram(ReferralProgram program)
Returns: void
Sets the referral programme the referral belongs to.
| Parameter | Description |
|---|---|
program | the referral programme, or null if there is none |
getSignup()
Returns: SignupLog
The signup that created the accepting member's account, when the referral was taken up by someone registering. Null when the acceptor already had an account. Loaded lazily.
setSignup(SignupLog signup)
Returns: void
Sets the signup that created the accepting member's account.
| Parameter | Description |
|---|---|
signup | the signup log for the acceptance, or null if there was none |
getCreatedDate()
Returns: Date
When the referral was accepted. Never null.
setCreatedDate(Date createdDate)
Returns: void
Sets the date the referral was accepted.
| Parameter | Description |
|---|---|
createdDate | the date the referral was accepted |
getActivatedDate()
Returns: Date
When the acceptance was activated by the referred member doing something that qualifies, such as making a purchase. Null while the acceptance has not been activated.
setActivatedDate(Date activatedDate)
Returns: void
Sets the date the acceptance was activated.
| Parameter | Description |
|---|---|
activatedDate | the activation date |
getRewardEntry()
Returns: RewardEntry
The reward entry this acceptance counts towards, when the referral is running as part of a promotion. Null otherwise.
setRewardEntry(RewardEntry rewardEntry)
Returns: void
Sets the reward entry this acceptance counts towards.
| Parameter | Description |
|---|---|
rewardEntry | the reward entry for the promotion, or null if there is none |
getStatus()
Returns: String
Approval state of the acceptance where the programme requires one: A means approval is needed, R means it was rejected and OK means it was accepted. Up to 10 characters, and null when no approval step applies.
setStatus(String status)
Returns: void
Sets the approval state of the acceptance.
| Parameter | Description |
|---|---|
status | the approval status code, one of A, R or OK |
getStatusDate()
Returns: Date
When the approval status was last changed. Null while the status has never been set.
setStatusDate(Date statusDate)
Returns: void
Sets the date the approval status was last changed.
| Parameter | Description |
|---|---|
statusDate | the date the status changed |
rowId()
Returns: Long
The database identifier of this acceptance, as required by the Relational interface.