Package com.orchestranetworks.instance
Class DefinitionMode
- java.lang.Object
-
- com.orchestranetworks.instance.DefinitionMode
-
public final class DefinitionMode extends Object
Defines the possible inheritance modes for a record.
-
-
Field Summary
Fields Modifier and Type Field Description static DefinitionMode
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.static DefinitionMode
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.static DefinitionMode
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.static DefinitionMode
INHERIT
A record is in inherit mode when it is not defined in the current table.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
format()
Returns a persistent identifier for this definition mode.String
getLabel()
Returns a human-readable label for this definition mode.boolean
isInherit()
Returnstrue
if this is theINHERIT
state.boolean
isOcculting()
Returnstrue
if this is theDEFINE_OCCULT
state.boolean
isOverwriting()
Returnstrue
if this is theDEFINE_OVERWRITE
state.boolean
isRoot()
Returnstrue
if this is theDEFINE_ROOT
state.static DefinitionMode
parse(String aFlag)
Returns the definition mode that corresponds to the specified string.String
toString()
-
-
-
Field Detail
-
INHERIT
public static final DefinitionMode 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
public static final DefinitionMode 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
public static final DefinitionMode 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
public static final DefinitionMode 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 Detail
-
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
public String 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(String)
-
parse
public static DefinitionMode parse(String aFlag)
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:
format()
-
getLabel
public String getLabel()
Returns a human-readable label for this definition mode.
-
-