Fluent builder that assembles and persists a PointStatement, a periodic snapshot of a participant's points balance for a reward. A CreatePointsStatementsProcessable populates the builder from the balance calculation it runs for a given reward and reporting date, then calls build to save the resulting PointStatement. Optional fields such as the simple balance, expiry projections, and the num/text extension columns are only set on the statement when a value has been supplied.
Group: Builders
Methods
issuedTo(BaseEntity issuedTo) · reward(Reward reward) · statementDate(Date statementDate) · balance(double balance) · simpleBalance(Double simpleBalance) · summary(String summary) · pointsExpiringNextOneMonth(Double pointsExpiringNextOneMonth) · pointsExpiringNextTwoMonths(Double pointsExpiringNextTwoMonths) · pointsExpiringNextThreeMonths(Double pointsExpiringNextThreeMonths) · num1(Double num1) · num2(Double num2) · num3(Double num3) · text1(String text1) · text2(String text2) · text3(String text3)
issuedTo(BaseEntity issuedTo)
Returns: PointStatementBuilder
Sets the base entity (usually a profile) that this statement is issued to.
| Parameter | Description |
|---|---|
issuedTo | the base entity the statement belongs to |
reward(Reward reward)
Returns: PointStatementBuilder
Sets the reward (points bucket) this statement reports a balance for.
| Parameter | Description |
|---|---|
reward | the reward the statement is issued for |
statementDate(Date statementDate)
Returns: PointStatementBuilder
Sets the date the statement is issued for, ie the point in time its balance is calculated as of.
| Parameter | Description |
|---|---|
statementDate | the reporting date for the statement |
balance(double balance)
Returns: PointStatementBuilder
Sets the rigorously calculated points balance as at the statement date.
| Parameter | Description |
|---|---|
balance | the calculated points balance |
simpleBalance(Double simpleBalance)
Returns: PointStatementBuilder
Sets the faster, simplified points balance calculation, used to cross-check the rigorous balance. Left unset on the statement when null.
| Parameter | Description |
|---|---|
simpleBalance | the simplified points balance, or null to leave it unset |
summary(String summary)
Returns: PointStatementBuilder
Sets a human-readable summary of how the statement was calculated, such as timing information. Left unset on the statement when blank.
| Parameter | Description |
|---|---|
summary | the summary text, or null or blank to leave it unset |
pointsExpiringNextOneMonth(Double pointsExpiringNextOneMonth)
Returns: PointStatementBuilder
Sets the total points due to expire within one month of the statement date. Left unset on the statement when null.
| Parameter | Description |
|---|---|
pointsExpiringNextOneMonth | the total expiring points, or null to leave it unset |
pointsExpiringNextTwoMonths(Double pointsExpiringNextTwoMonths)
Returns: PointStatementBuilder
Sets the total points due to expire within two months of the statement date. Left unset on the statement when null.
| Parameter | Description |
|---|---|
pointsExpiringNextTwoMonths | the total expiring points, or null to leave it unset |
pointsExpiringNextThreeMonths(Double pointsExpiringNextThreeMonths)
Returns: PointStatementBuilder
Sets the total points due to expire within three months of the statement date. Left unset on the statement when null.
| Parameter | Description |
|---|---|
pointsExpiringNextThreeMonths | the total expiring points, or null to leave it unset |
num1(Double num1)
Returns: PointStatementBuilder
Sets the first configurable numeric extension field, evaluated from the reward's point statement field definitions. Left unset on the statement when null.
| Parameter | Description |
|---|---|
num1 | the value for the first numeric extension field, or null to leave it unset |
num2(Double num2)
Returns: PointStatementBuilder
Sets the second configurable numeric extension field, evaluated from the reward's point statement field definitions. Left unset on the statement when null.
| Parameter | Description |
|---|---|
num2 | the value for the second numeric extension field, or null to leave it unset |
num3(Double num3)
Returns: PointStatementBuilder
Sets the third configurable numeric extension field, evaluated from the reward's point statement field definitions. Left unset on the statement when null.
| Parameter | Description |
|---|---|
num3 | the value for the third numeric extension field, or null to leave it unset |
text1(String text1)
Returns: PointStatementBuilder
Sets the first configurable text extension field, evaluated from the reward's point statement field definitions. Left unset on the statement when null.
| Parameter | Description |
|---|---|
text1 | the value for the first text extension field, or null to leave it unset |
text2(String text2)
Returns: PointStatementBuilder
Sets the second configurable text extension field, evaluated from the reward's point statement field definitions. Left unset on the statement when null.
| Parameter | Description |
|---|---|
text2 | the value for the second text extension field, or null to leave it unset |
text3(String text3)
Returns: PointStatementBuilder
Sets the third configurable text extension field, evaluated from the reward's point statement field definitions. Left unset on the statement when null.
| Parameter | Description |
|---|---|
text3 | the value for the third text extension field, or null to leave it unset |