Package com.orchestranetworks.instance
Class DefinitionMode
java.lang.Object
com.orchestranetworks.instance.DefinitionMode
Defines the possible inheritance modes for a record.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DefinitionModeThe record is in occulting mode to specify that the record with the same primary key is not inherited from the parent dataset.static final DefinitionModeThe record is in overwriting mode when it is locally defined in the current table and it has a parent record with the same primary key.static final DefinitionModeA record is in root mode when it is locally defined in the current table and it does not inherit from a parent record.static final DefinitionModeA record is in inherit mode when it is not defined in the current table. -
Method Summary
Modifier and TypeMethodDescriptionformat()Returns a persistent identifier for this definition mode.getLabel()Returns a human-readable label for this definition mode.booleanReturnstrueif this is theINHERITstate.booleanReturnstrueif this is theDEFINE_OCCULTstate.booleanReturnstrueif this is theDEFINE_OVERWRITEstate.booleanisRoot()Returnstrueif this is theDEFINE_ROOTstate.static DefinitionModeReturns the definition mode that corresponds to the specified string.toString()
-
Field Details
-
INHERIT
A record is in inherit mode when it is not defined in the current table. This implies that it inherits all its values from a parent record defined in an ancestor table. -
DEFINE_ROOT
A record is in root mode when it is locally defined in the current table and it does not inherit from a parent record. -
DEFINE_OVERWRITE
The record is in overwriting mode when it is locally defined in the current table and it has a parent record with the same primary key.The record then inherits its unspecified values from its parent record.
-
DEFINE_OCCULT
The record is in occulting mode to specify that the record with the same primary key is not inherited from the parent dataset. This implies that the resolved view of the table does not contain this record.If a record in occulting mode is deleted, it becomes inherited if a record with the same primary key exists in the parent dataset (either root, overwriting or itself inherited).
-
-
Method Details
-
isInherit
public boolean isInherit()Returnstrueif this is theINHERITstate. -
isRoot
public boolean isRoot()Returnstrueif this is theDEFINE_ROOTstate. -
isOverwriting
public boolean isOverwriting()Returnstrueif this is theDEFINE_OVERWRITEstate. -
isOcculting
public boolean isOcculting()Returnstrueif this is theDEFINE_OCCULTstate. -
format
Returns a persistent identifier for this definition mode.The persistent identifier can be re-obtained by parsing using the method
parse(String).- See Also:
-
parse
Returns the definition mode that corresponds to the specified string.The specified string must have been generated by the method
format().- Throws:
IllegalArgumentException- if string specified is incorrect.- See Also:
-
getLabel
Returns a human-readable label for this definition mode. -
toString
-