Class SplicingOptions
Object
SplicingOptions
Class for splicing process of Condition Records. These options are applied to all
The options are:
CRCI items touched by splicing process. The options are:
- set - allows define the value which will be set to defined CR column - Except for key values and validity period values
- reset - allows to set value to
nullto defined CR column - Except for key values and validity period values - withSupersedingOn - allows to set superseding mode during the splicing
Examples
Examples of usage for each option.Set value to column
conditionRecordHelper.withSplicingOption().set("attribute1", "BoT")Reset value in column
conditionRecordHelper.withSplicingOption().reset("attribute1")Set superseding ON
conditionRecordHelper.withSplicingOption().setSupersedingOn()-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet list of fields that should be set tonullvalue (reset).Get fields (key in map) that should be set to certain value (value in map).booleanRealize if records are superseded or deleted.Set option to reset field value tonull.Set option to set field with givenfieldNamename value to givenfieldValuevalue.Set superseding function ON, which archive items instead of deleting them.Validate correctness of all options set by user.
-
Constructor Details
-
SplicingOptions
public SplicingOptions()
-
-
Method Details
-
getSetFields
Get fields (key in map) that should be set to certain value (value in map).- Returns:
- Map of field names (key) and field values (value) to be set during splicing process.
-
getResetFields
Get list of fields that should be set tonullvalue (reset).- Returns:
Listof field names to be set tonullvalue during splicing process.
-
set
Set option to set field with givenfieldNamename value to givenfieldValuevalue. These values are set for allCRCIitems touched by splicing process.- Parameters:
fieldName- Name of field to be set.fieldValue- Value of the field to be set.- Returns:
- SplicingOptions
-
reset
Set option to reset field value tonull. This value is set for allCRCIitems touched by splicing process.- Parameters:
fieldName- Name of field to be reset.- Returns:
- SplicingOptions
-
validateOptions
Validate correctness of all options set by user. Throws an exception, if any option is incorrect.
Incorrect option can be:- clash of
setandresetfields - User can't put the same attribute tosetandresetfields nullvalue insetfields - Example of incorrect usage:conditionRecordHelper.withSplicingOption().set("attribute1", null). To set tonullusereset(String)function.
- Returns:
- SplicingOptions
- Throws:
IllegalArgumentException- If any option is incorrect.
- clash of
-
getSupersedeRecords
public boolean getSupersedeRecords()Realize if records are superseded or deleted. IfsetSupersedingOn()is called, returnstrue. If not used, returnsfalse(default).- Returns:
Trueif records are superseded (moved to historical table), orfalseif they are deleted.
-
setSupersedingOn
Set superseding function ON, which archive items instead of deleting them. OFF by default.- Returns:
- SplicingOptions
-