Package com.orchestranetworks.instance
Class DefinitionMode
java.lang.Object
com.orchestranetworks.instance.DefinitionMode
Defines the possible inheritance modes for a record.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DefinitionMode
The record is in occulting mode to specify that the record with the same primary key is not inherited from the parent dataset.static final DefinitionMode
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.static final DefinitionMode
A 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 DefinitionMode
A 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.boolean
Returnstrue
if this is theINHERIT
state.boolean
Returnstrue
if this is theDEFINE_OCCULT
state.boolean
Returnstrue
if this is theDEFINE_OVERWRITE
state.boolean
isRoot()
Returnstrue
if this is theDEFINE_ROOT
state.static DefinitionMode
Returns 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()Returnstrue
if this is theINHERIT
state. -
isRoot
public boolean isRoot()Returnstrue
if this is theDEFINE_ROOT
state. -
isOverwriting
public boolean isOverwriting()Returnstrue
if this is theDEFINE_OVERWRITE
state. -
isOcculting
public boolean isOcculting()Returnstrue
if this is theDEFINE_OCCULT
state. -
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
-