public interface PlasmaDataObject
extends commonj.sdo.DataObject
data graph.
Each data object holds its data as a series of Properties.
Properties can be accessed by name, property index, or using the property
meta object itself. A data object can also contain references to other data
objects, through reference-type Properties.
A data object has a series of convenience accessors for its Properties. These
methods either use a path (String), a property index, or the property's meta object itself, to identify the property. Some examples of
the path-based accessors are as follows:
DataObject company = ...;
company.get("name"); is the same as company.get(company.getType().getProperty("name"))
company.set("name", "acme");
company.get("department.0/name") is the same as ((DataObject)((List)company.get("department")).get(0)).get("name")
.n indexes from 0 ... implies the name property of the first department
company.get("department[1]/name") [] indexes from 1 ... implies the name property of the first department
company.get("department[number=123]") returns the first department where number=123
company.get("..") returns the containing data object
company.get("/") returns the root containing data object
There are general accessors for Properties, i.e., get
and set, as well as specific accessors for the
primitive types and commonly used data types like String, Date, List,
BigInteger, and BigDecimal.
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PlasmaDataGraphEventVisitor visitor)
Begin breadth-first traversal of a DataGraph with this DataObject as the
graph root, the given visitor receiving various events for each graph node
traversed.
|
void |
accept(PlasmaDataGraphVisitor visitor)
Begin breadth-first traversal of a DataGraph with this DataObject as the
graph root, the given visitor receiving "visit" events for each graph node
traversed.
|
void |
accept(PlasmaDataGraphVisitor visitor,
int maxLevel)
Begin breadth-first traversal of a DataGraph with this DataObject as the
graph root, the given visitor receiving "visit" events for each graph node
traversed.
|
void |
acceptDepthFirst(PlasmaDataGraphVisitor visitor)
Begin depth-first traversal of a DataGraph with this DataObject as the
graph root, the given visitor receiving "visit" events for each graph node
traversed.
|
void |
add(commonj.sdo.Property property,
Object value)
Adds the given value to the given multi=valued property.
|
boolean |
contains(commonj.sdo.DataObject dataObject)
Returns true if this data object is the container for the given data
object.
|
String |
dump()
Produces a raw dump format
|
String |
dumpDepthFirst()
Produces a raw dump format using a depth first graph traversal
|
commonj.sdo.DataObject |
find(String key)
Searches this data object graph returning the data object with a UUID
string matching the given key.
|
Object |
get(FunctionName func,
commonj.sdo.Property property)
Returns the scalar value for the given property associated with the given
scalar function.
|
PlasmaDataObject |
getDataObject() |
UUID |
getUUID()
Returns the UUID for this data object.
|
String |
getUUIDAsString()
Returns the UUID for this data object as a character string.
|
void |
remove() |
void |
remove(commonj.sdo.Property property,
Object value)
Removes the given value from this data object for the given multi-valued
property.
|
void |
reparent(PlasmaDataObject container,
commonj.sdo.Property containmentProperty)
Deprecated.
|
void |
reset(SnapshotMap commitMap,
String username)
Synchronizes the state of this data object to that of it's data store given
the map of UUID's and associated info resulting from a successful commit.
|
void |
resetUUID(UUID uuid)
Resets the UUID after creation for cases where the UUID is stored
externally and services creating data objects need to preserve the stored
UUIDs across service calls.
|
void |
set(FunctionName func,
commonj.sdo.Property property,
Object value)
Sets the scalar value for the given property associated with the given
scalar function.
|
void |
setContainer(commonj.sdo.DataObject container)
Deprecated.
|
void |
setContainmentProperty(commonj.sdo.Property containmentProperty)
Deprecated.
|
void |
setDataGraph(commonj.sdo.DataGraph dataGraph)
Deprecated.
|
PlasmaValue[] |
values()
Returns the current set of values for the data object including all defined
and inherited properties, both singular and multi-valued data and reference
properties.
|
createDataObject, createDataObject, createDataObject, createDataObject, createDataObject, createDataObject, delete, detach, get, get, get, getBigDecimal, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getBytes, getBytes, getBytes, getChangeSummary, getChar, getChar, getChar, getContainer, getContainmentProperty, getDataGraph, getDataObject, getDataObject, getDataObject, getDate, getDate, getDate, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInstanceProperties, getInstanceProperty, getInt, getInt, getInt, getList, getList, getList, getLong, getLong, getLong, getProperty, getRootObject, getSequence, getSequence, getSequence, getSequence, getShort, getShort, getShort, getString, getString, getString, getType, isSet, isSet, isSet, set, set, set, setBigDecimal, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBigInteger, setBoolean, setBoolean, setBoolean, setByte, setByte, setByte, setBytes, setBytes, setBytes, setChar, setChar, setChar, setDataObject, setDataObject, setDataObject, setDate, setDate, setDate, setDouble, setDouble, setDouble, setFloat, setFloat, setFloat, setInt, setInt, setInt, setList, setList, setList, setLong, setLong, setLong, setShort, setShort, setShort, setString, setString, setString, unset, unset, unset@Deprecated void setDataGraph(commonj.sdo.DataGraph dataGraph)
@Deprecated void setContainer(commonj.sdo.DataObject container)
@Deprecated void setContainmentProperty(commonj.sdo.Property containmentProperty)
containmentProperty - the containment property, which must be a declared property within
the type for the current container data object.@Deprecated void reparent(PlasmaDataObject container, commonj.sdo.Property containmentProperty)
data object to another data graph, makes
this data object to be contained by the given container data object using
the given containment property. The property and its opposite if exists,
are automatically set and flagged as modified in the change summary. This data object automatically becomes part of the
data graph of the given container.container - the container data object.containmentProperty - the containment property, which must be a declared property within
the type for the given container data object.void add(commonj.sdo.Property property,
Object value)
property - the multi-valued propertyvalue - the value to add - can be a list of valuesvoid remove(commonj.sdo.Property property,
Object value)
property - multi-valued the propertyvalue - the value to removeUnsupportedOperationException - if the given property is not multi-valuedvoid reset(SnapshotMap commitMap, String username)
commitMap - - the map of UUID's mapped to, e.g. data store generated sequence
numbers.username - - the user who committed the modifications.void remove()
boolean contains(commonj.sdo.DataObject dataObject)
dataObject - the data objectUUID getUUID()
void resetUUID(UUID uuid)
uuid - the UUIDString getUUIDAsString()
PlasmaDataObject getDataObject()
void accept(PlasmaDataGraphVisitor visitor)
visitor - the graph visitor receiving traversal eventsDataGraph,
DataObject,
PlasmaDataGraph,
PlasmaDataObject,
PlasmaDataGraphVisitor.visit()void accept(PlasmaDataGraphVisitor visitor, int maxLevel)
visitor - the graph visitor receiving traversal eventsmaxLevel - the maximum number of "hierarchical" levels to traverseDataGraph,
DataObject,
PlasmaDataGraph,
PlasmaDataObject,
PlasmaDataGraphVisitor.visit()void acceptDepthFirst(PlasmaDataGraphVisitor visitor)
visitor - the graph visitor receiving traversal eventsDataGraph,
DataObject,
PlasmaDataGraph,
PlasmaDataObject,
PlasmaDataGraphVisitor.visit()void accept(PlasmaDataGraphEventVisitor visitor)
visitor - the graph visitor receiving traversal eventsDataGraph,
DataObject,
PlasmaDataGraph,
PlasmaDataObject,
PlasmaDataGraphVisitor.visit()commonj.sdo.DataObject find(String key)
key - the UUID string keyPlasmaValue[] values()
This method does not return values for instance properties, only defined and inherited properties.
Object get(FunctionName func, commonj.sdo.Property property)
func - the scalar functionproperty - the propertyvoid set(FunctionName func, commonj.sdo.Property property, Object value)
func - the scalar functionproperty - the propertyString dump()
String dumpDepthFirst()
Copyright © 2021. All rights reserved.