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
null
to 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 tonull
value (reset).Get fields (key in map) that should be set to certain value (value in map).boolean
Realize if records are superseded or deleted.Set option to reset field value tonull
.Set option to set field with givenfieldName
name value to givenfieldValue
value.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 tonull
value (reset).- Returns:
List
of field names to be set tonull
value during splicing process.
-
set
Set option to set field with givenfieldName
name value to givenfieldValue
value. These values are set for allCRCI
items 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 allCRCI
items 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
set
andreset
fields - User can't put the same attribute toset
andreset
fields null
value inset
fields - Example of incorrect usage:conditionRecordHelper.withSplicingOption().set("attribute1", null)
. To set tonull
usereset(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:
True
if records are superseded (moved to historical table), orfalse
if they are deleted.
-
setSupersedingOn
Set superseding function ON, which archive items instead of deleting them. OFF by default.- Returns:
- SplicingOptions
-