Interface PrimaryKeyFieldMergeFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a function that builds a primary key field during a merge operation.
This function is applied to an automatically created golden record and based on
a given context.
PrimaryKeyFieldMergeContext
- Since:
- 6.1.3
-
Method Summary
Modifier and TypeMethodDescriptionObject[]
apply
(PrimaryKeyFieldMergeContext primaryKeyFieldMergeContext) Applies this function to the given primary key field merge context.
-
Method Details
-
apply
Applies this function to the given primary key field merge context.
This method is invoked for each new auto created golden record.
Life cycle:
-
The method is invoked after getting the survivor record in the
group (
RecordSelectionFunction.apply(List)
}) and before getting the values of all normal fields (FieldMergeFunction.apply(FieldMergeContext)
). -
The values of the primary key field are set in the new golden
record after the method
TableTrigger.handleNewContext(com.orchestranetworks.schema.trigger.NewTransientOccurrenceContext)
call and before all others triggers in the table.
- Parameters:
primaryKeyFieldMergeContext
- Current context when create new auto created golden record- Returns:
- Object[]
-
The values of primary key fields. The order must respect
the order of the fields returned by
PrimaryKeyFieldMergeContext.getTablePrimaryKeyNodes()
. -
If a value of the object is
null
, the corresponding value of the primary key field will be ignored. -
If the result returned by applying this function is
null
or has a different length than the array returned byPrimaryKeyFieldMergeContext.getTablePrimaryKeyNodes()
, this result will be ignored.
-
The values of primary key fields. The order must respect
the order of the fields returned by
-
The method is invoked after getting the survivor record in the
group (
-