Package net.pricefx.formulaengine
Interface IRebateRecordManager
-
public interface IRebateRecordManagerThe RebateRecordManager API is exposed to formula groovy elements in two separate contexts: 1) in a RebateAgreement calculation (typeCode='RBA' aka RA), when the formula context's 'currentItem' would be an individual line item (typeCode='RBLI' aka RLI) 2) in a RebateAgreement 'read-only' evaluation (when opening an uneditable RA); currentItem is again a RLI 3) in a RebateRecordSet calculation, the formula context's 'currentItem' would be an individual RebateRecord (typeCode='RR') The API can be accessed via the 'rebateRecords' Groovy binding. Not all methods are implemented in both contexts: RRs can only be added in RA calculations.(1). Similarly setRank() is only effective in context 1. Context 2 obviously does not allow any modification, be it adding or updating RRs. Context 3 only allows updaitng existing RRs (ithrough the set(..) mehtods).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description RebateRecordadd(String rebateRecordName, String rebateRecordSetLabel, Map<?,?>... attributeValues)Add a RR in the given RR-set to the current RA.lineitem with the given name and optional initial generic attribute values If the RR-set with the given label does not yet exist, it will be created as a side-effect.RebateRecordadd(String rebateRecordName, Map<?,?>... attributeValues)Add a RR to the current RA.lineitem with the given name and optional initial generic attribute valuesRebateRecordadd(Map<?,?>... attributeValues)Add a RR to the current RA.lineitem with the default name and optional initial generic attribute valuesResultRebateRecordasLink()Return a clickable link to the RR with the default name, as the result of a formula elementResultRebateRecordasLink(String rebateRecordName)Return a clickable link to the RR with the given name, as the result of a formula elementResultRebateRecordasLink(String rebateRecordName, String rebateRecordSetLabel)Return a clickable link to the RR for the given name and RR-set, as the result of a formula elementResultMatrixasResultMatrix(String... attributes)Return a ResultMatrix listing all RRs in the agreement, optionally the fields/attributes to be shown as matrix columns.ChartBuilderResultbuildDataTableChart(String datamartName, String dateDimFieldName)Deprecated.RebateRecordget()Get the RR with the default name linked to the current RA.lineitemRebateRecordget(String rebateRecordName)Get the RR with the given name linked to the current RA.lineitemRebateRecordget(String rebateRecordName, String rebateRecordSetLabel)In the given RR-set, get the RR with the given name linked to the current RA.lineitemList<RebateRecord>getAll()Get all RRs linked to the the current agreement (via RR --> RLI --> RBA).List<RebateRecord>getAll(String lineId)Get all RRs linked to the line item with the given lineID in the current agreement (via RR --> RLI).ObjectgetResult(String elementName)Get the formula element result for the RR with the default name linked to the current RA.lineitemObjectgetResult(String rebateRecordName, String elementName)Get the formula element result for the RR with the given name linked to the current RA.lineitemObjectgetResult(String rebateRecordName, String rebateRecordSetLabel, String elementName)In the given RR-set, get the formula element result for the RR with the given name linked to the current RA.lineitembooleanset(String rebateRecordName, String rebateRecordSetLabel, Map<?,?>... attributeValues)In the given RR-set, update genetic attributes of the RR with the given name (linked to the current RA.lineitem)booleanset(String rebateRecordName, Map<?,?>... attributeValues)Update genetic attributes of the RR with the given name (linked to the current RA.lineitem)booleanset(Map<?,?>... attributeValues)Update genetic attributes of the RR with the default name (linked to the current RA.lineitem)booleansetRank(int rank)Sets the rank on the default RR.booleansetRank(String rebateRecordName, int rank)Sets the rank on the named RR.
-
-
-
Method Detail
-
add
RebateRecord add(Map<?,?>... attributeValues)
Add a RR to the current RA.lineitem with the default name and optional initial generic attribute values
-
add
RebateRecord add(String rebateRecordName, Map<?,?>... attributeValues)
Add a RR to the current RA.lineitem with the given name and optional initial generic attribute values
-
add
RebateRecord add(String rebateRecordName, String rebateRecordSetLabel, Map<?,?>... attributeValues)
Add a RR in the given RR-set to the current RA.lineitem with the given name and optional initial generic attribute values If the RR-set with the given label does not yet exist, it will be created as a side-effect.
-
setRank
boolean setRank(int rank)
Sets the rank on the default RR. RRs with a lower rank are calculated first within a given agreement.
-
setRank
boolean setRank(String rebateRecordName, int rank)
Sets the rank on the named RR. RRs with a lower rank are calculated first within a given agreement.
-
getAll
List<RebateRecord> getAll()
Get all RRs linked to the the current agreement (via RR --> RLI --> RBA).
-
getAll
List<RebateRecord> getAll(String lineId)
Get all RRs linked to the line item with the given lineID in the current agreement (via RR --> RLI).
-
get
RebateRecord get()
Get the RR with the default name linked to the current RA.lineitem
-
get
RebateRecord get(String rebateRecordName)
Get the RR with the given name linked to the current RA.lineitem
-
get
RebateRecord get(String rebateRecordName, String rebateRecordSetLabel)
In the given RR-set, get the RR with the given name linked to the current RA.lineitem
-
set
boolean set(Map<?,?>... attributeValues)
Update genetic attributes of the RR with the default name (linked to the current RA.lineitem)
-
set
boolean set(String rebateRecordName, Map<?,?>... attributeValues)
Update genetic attributes of the RR with the given name (linked to the current RA.lineitem)
-
set
boolean set(String rebateRecordName, String rebateRecordSetLabel, Map<?,?>... attributeValues)
In the given RR-set, update genetic attributes of the RR with the given name (linked to the current RA.lineitem)
-
getResult
Object getResult(String elementName)
Get the formula element result for the RR with the default name linked to the current RA.lineitem
-
getResult
Object getResult(String rebateRecordName, String elementName)
Get the formula element result for the RR with the given name linked to the current RA.lineitem
-
getResult
Object getResult(String rebateRecordName, String rebateRecordSetLabel, String elementName)
In the given RR-set, get the formula element result for the RR with the given name linked to the current RA.lineitem
-
asLink
ResultRebateRecord asLink()
Return a clickable link to the RR with the default name, as the result of a formula element
-
asLink
ResultRebateRecord asLink(String rebateRecordName)
Return a clickable link to the RR with the given name, as the result of a formula element
-
asLink
ResultRebateRecord asLink(String rebateRecordName, String rebateRecordSetLabel)
Return a clickable link to the RR for the given name and RR-set, as the result of a formula element
-
asResultMatrix
ResultMatrix asResultMatrix(String... attributes)
Return a ResultMatrix listing all RRs in the agreement, optionally the fields/attributes to be shown as matrix columns.
-
buildDataTableChart
@Deprecated ChartBuilderResult buildDataTableChart(String datamartName, String dateDimFieldName)
Deprecated.
-
-