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

PropertyReturnsDescription
acceptedProfileProfileThe member who took up the referral, ie the person who was referred. Never null for a persisted acceptance, and loaded lazily.
activatedDateDateWhen 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.
createdDateDateWhen the referral was accepted. Never null.
idlongThe database identifier of this acceptance.
programReferralProgramThe referral programme the referral belongs to, denormalised from the referral. Null for a referral that is not part of a programme, and loaded lazily.
referralReferralThe 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.
rewardEntryRewardEntryThe reward entry this acceptance counts towards, when the referral is running as part of a promotion. Null otherwise.
signupSignupLogThe 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.
statusStringApproval 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.
statusDateDateWhen 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.

ParameterDescription
organisationthe 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.

ParameterDescription
acceptedProfilethe 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.

ParameterDescription
referralthe 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.

ParameterDescription
programthe 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.

ParameterDescription
signupthe 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.

ParameterDescription
createdDatethe 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.

ParameterDescription
activatedDatethe 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.

ParameterDescription
rewardEntrythe 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.

ParameterDescription
statusthe 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.

ParameterDescription
statusDatethe date the status changed

rowId()

Returns: Long

The database identifier of this acceptance, as required by the Relational interface.

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