Links a SalesDataRecord to a RecordMatch group, either as one of the records consumed to produce the match (SOURCE) or as one of the records generated by the match (DEST). A RecordMatch group typically has several SOURCE links and one or more DEST links. This replaces the CSV-column approach used by PointsAllocation.salesDataRecordIds, which can only be looked up correctly when it holds a single id. Using a proper join row per (group, record, role) allows efficient, correct lookups from either direction.
Group: Database Entities
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| dest | boolean | Whether the record was generated by this match, rather than consumed to produce it. Derived from the link role, not a stored column. |
| id | long | The database identifier of this link row. |
| linkRole | String | The part the record plays in the match: SOURCE for a record consumed to produce the match, DEST for a record generated by it, or INVALIDATION for a record that cancels the match. Never null. |
| matchGroup | RecordMatch | The match group this link belongs to. Never null for a persisted link, and loaded lazily. |
| record | SalesDataRecord | The sales data record joined to the match group by this link. Never null for a persisted link, and loaded lazily. |
| source | boolean | Whether the record was consumed to produce this match, rather than generated by it. Derived from the link role, not a stored column. |
Methods
getId() · getMatchGroup() · setMatchGroup(RecordMatch matchGroup) · getRecord() · setRecord(SalesDataRecord record) · getLinkRole() · setLinkRole(String linkRole) · isSource() · isDest()
getId()
Returns: long
The database identifier of this link row.
getMatchGroup()
Returns: RecordMatch
The match group this link belongs to. Never null for a persisted link, and loaded lazily.
setMatchGroup(RecordMatch matchGroup)
Returns: void
Sets the match group this link belongs to.
| Parameter | Description |
|---|---|
matchGroup | the record match this link is part of |
getRecord()
Returns: SalesDataRecord
The sales data record joined to the match group by this link. Never null for a persisted link, and loaded lazily.
setRecord(SalesDataRecord record)
Returns: void
Sets the sales data record joined to the match group by this link.
| Parameter | Description |
|---|---|
record | the linked sales data record |
getLinkRole()
Returns: String
The part the record plays in the match: SOURCE for a record consumed to produce the match, DEST for a record generated by it, or INVALIDATION for a record that cancels the match. Never null.
setLinkRole(String linkRole)
Returns: void
Sets the part the record plays in the match.
| Parameter | Description |
|---|---|
linkRole | the link role code, one of ROLE_SOURCE, ROLE_DEST or ROLE_INVALIDATION |
isSource()
Returns: boolean
Whether the record was consumed to produce this match, rather than generated by it. Derived from the link role, not a stored column.
isDest()
Returns: boolean
Whether the record was generated by this match, rather than consumed to produce it. Derived from the link role, not a stored column.