org.plasma.sdo.core
Class CoreDataObject

java.lang.Object
  extended by org.plasma.sdo.core.CoreNode
      extended by org.plasma.sdo.core.CoreDataObject
All Implemented Interfaces:
DataObject, Serializable, CoreObjectHolder, NamedEntity, Node, PlasmaDataObject, PlasmaNode
Direct Known Subclasses:
ConstraintImpl, GlobalVariableImpl, GlobalVariableImpl, TableColumnCommentImpl, TableColumnConstraintImpl, TableColumnConstraintImpl, TableColumnImpl, TableColumnImpl, TableColumnKeyUsageImpl, TableCommentImpl, TableConstraintImpl, TableImpl, TableImpl, VersionImpl, VersionImpl, ViewColumnCommentImpl, ViewColumnImpl, ViewCommentImpl, ViewImpl, ViewImpl

public class CoreDataObject
extends CoreNode
implements PlasmaDataObject

A data object is a representation of some structured data. It is the fundamental component in the SDO (Service Data Objects) package. Data objects support reflection, path-based accesss, convenience creation and deletion methods, and the ability to be part of a 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.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.plasma.sdo.core.CoreNode
EMPTY_EDGE_LIST, valueObject
 
Constructor Summary
protected CoreDataObject()
          Default No-arg constructor required for serialization operations.
  CoreDataObject(Type type)
           
protected CoreDataObject(Type type, CoreObject values)
           
 
Method Summary
 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(Property property, Object value)
          Adds the given value to the given multi=valued property.
 boolean contains(DataObject dataObject)
          Returns true if this data object is the container for the given data object.
 DataObject createDataObject(int propertyIndex)
          Returns a new data object contained by this object using the specified property, which must be a containment property.
 DataObject createDataObject(int propertyIndex, String namespaceURI, String typeName)
          Returns a new data object contained by this object using the specified property, which must be a containment property.
 DataObject createDataObject(Property property)
          Returns a new data object contained by this object using the specified property, which must be a containment property.
 DataObject createDataObject(Property property, Type type)
          Returns a new data object contained by this object using the specified property, which must be of containment type.
 DataObject createDataObject(String propertyName)
          Returns a new data object contained by this object using the specified property, which must be a containment property.
 DataObject createDataObject(String propertyName, String namespaceURI, String typeName)
          Returns a new data object contained by this object using the specified property, which must be a containment property.
 void delete()
          Remove this object from its container and then unset all its non- readOnly properties.
 void detach()
          Removes this DataObject from its data graph and container, if any.
 String dump()
           
 String dumpDepthFirst()
           
 boolean equals(Object obj)
           
 DataObject find(String key)
           
 Object get(int propertyIndex)
          Returns the value of the property at the specified index in property list of this object's type.
 Object get(Property property)
          Returns the value of the given property of this object.
 Object get(String path)
          Returns the value of a property of either this object or an object reachable from it, as identified by the specified path.
 BigDecimal getBigDecimal(int propertyIndex)
          Returns the value of a BigDecimal property identified by the specified property index.
 BigDecimal getBigDecimal(Property property)
          Returns the value of the specified BigDecimal property.
 BigDecimal getBigDecimal(String path)
          Returns the value of a BigDecimal property identified by the specified path.
 BigInteger getBigInteger(int propertyIndex)
          Returns the value of a BigInteger property identified by the specified property index.
 BigInteger getBigInteger(Property property)
          Returns the value of the specified BigInteger property.
 BigInteger getBigInteger(String path)
          Returns the value of a BigInteger property identified by the specified path.
 boolean getBoolean(int propertyIndex)
          Returns the value of a boolean property identified by the specified property index.
 boolean getBoolean(Property property)
          Returns the value of the specified boolean property.
 boolean getBoolean(String path)
          Returns the value of a boolean property identified by the specified path.
 byte getByte(int propertyIndex)
          Returns the value of a byte property identified by the specified property index.
 byte getByte(Property property)
          Returns the value of the specified byte property.
 byte getByte(String path)
          Returns the value of a byte property identified by the specified path.
 byte[] getBytes(int propertyIndex)
          Returns the value of a byte[] property identified by the specified property index.
 byte[] getBytes(Property property)
          Returns the value of the specified byte[] property.
 byte[] getBytes(String path)
          Returns the value of a byte[] property identified by the specified path.
 ChangeSummary getChangeSummary()
          Returns the ChangeSummary with scope covering this dataObject, or null if there is no ChangeSummary.
 char getChar(int propertyIndex)
          Returns the value of a char property identified by the specified property index.
 char getChar(Property property)
          Returns the value of the specified char property.
 char getChar(String path)
          Returns the value of a char property identified by the specified path.
 DataObject getContainer()
          Returns the containing data object or null if there is no container.
 Property getContainmentProperty()
          Return the Property of the data object containing this data object or null if there is no container.
 DataGraph getDataGraph()
          Returns the data graph for this object or null if there isn't one.
 PlasmaDataObject getDataObject()
           
 DataObject getDataObject(int propertyIndex)
          Returns the value of a DataObject property identified by the specified property index.
 DataObject getDataObject(Property property)
          Returns the value of the specified DataObject property.
 DataObject getDataObject(String path)
          Returns the value of a DataObject property identified by the specified path.
 Date getDate(int propertyIndex)
          Returns the value of a Date property identified by the specified property index.
 Date getDate(Property property)
          Returns the value of the specified Date property.
 Date getDate(String path)
          Returns the value of a Date property identified by the specified path.
 double getDouble(int propertyIndex)
          Returns the value of a double property identified by the specified property index.
 double getDouble(Property property)
          Returns the value of the specified double property.
 double getDouble(String path)
          Returns the value of a double property identified by the specified path.
 float getFloat(int propertyIndex)
          Returns the value of a float property identified by the specified property index.
 float getFloat(Property property)
          Returns the value of the specified float property.
 float getFloat(String path)
          Returns the value of a float property identified by the specified path.
 List getInstanceProperties()
          Returns a read-only List of the Properties currently used in this DataObject.
 Property getInstanceProperty(String propertyName)
          Returns the named Property from the current instance properties, or null if not found.
 int getInt(int propertyIndex)
          Returns the value of a int property identified by the specified property index.
 int getInt(Property property)
          Returns the value of the specified int property.
 int getInt(String path)
          Returns the value of a int property identified by the specified path.
 List getList(int propertyIndex)
          Returns the value of a List property identified by the specified property index.
 List getList(Property property)
          Returns the value of the specified List property.
 List getList(String path)
          Returns the value of a List property identified by the specified path.
 long getLong(int propertyIndex)
          Returns the value of a long property identified by the specified property index.
 long getLong(Property property)
          Returns the value of the specified long property.
 long getLong(String path)
          Returns the value of a long property identified by the specified path.
 Property getProperty(String propertyName)
           
 DataObject getRootObject()
          Returns the root data object.
 Sequence getSequence()
          Returns the Sequence for this DataObject.
 Sequence getSequence(int propertyIndex)
          Deprecated. in 2.1.0.
 Sequence getSequence(Property property)
          Deprecated. in 2.1.0.
 Sequence getSequence(String path)
          Deprecated. in 2.1.0.
 short getShort(int propertyIndex)
          Returns the value of a short property identified by the specified property index.
 short getShort(Property property)
          Returns the value of the specified short property.
 short getShort(String path)
          Returns the value of a short property identified by the specified path.
 String getString(int propertyIndex)
          Returns the value of a String property identified by the specified property index.
 String getString(Property property)
          Returns the value of the specified String property.
 String getString(String path)
          Returns the value of a String property identified by the specified path.
 Type getType()
          Returns the data object's type.
 UUID getUUID()
          Returns the UUID for this data object.
 String getUUIDAsString()
          Deprecated. 
 int hashCode()
           
 boolean isSet(int propertyIndex)
          Returns whether the the property at the specified index in property list of this object's type, is considered to be set.
 boolean isSet(Property property)
          Returns whether the property of the object is considered to be set.
 boolean isSet(String path)
          Returns whether a property of either this object or an object reachable from it, as identified by the specified path, is considered to be set.
 void remove()
           
 void remove(Property property, Object value)
          Removes the given value from this data object for the given multi-valued property.
 void reset(SnapshotMap idMap, String username)
          Sync up 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(int propertyIndex, Object value)
          Conversions are specified in Java [6] and the DataHelper.
 void set(Property property, Object value)
          Sets the value of the given property of the object to the new value.
 void set(String path, Object value)
          Sets a property of either this object or an object or objects reachable from it, as identified by the specified path.
 void setBigDecimal(int propertyIndex, BigDecimal value)
          Sets the value of a BigDecimal property identified by the specified property index, to the specified value.
 void setBigDecimal(Property property, BigDecimal value)
          Sets the value of the specified BigDecimal property, to the specified value.
 void setBigDecimal(String path, BigDecimal value)
          Sets the value of a BigDecimal property identified by the specified path, to the specified value.
 void setBigInteger(int propertyIndex, BigInteger value)
          Sets the value of a BigInteger property identified by the specified property index, to the specified value.
 void setBigInteger(Property property, BigInteger value)
          Sets the value of the specified BigInteger property, to the specified value.
 void setBigInteger(String path, BigInteger value)
          Sets the value of a BigInteger property identified by the specified path, to the specified value.
 void setBoolean(int propertyIndex, boolean value)
          Sets the value of a boolean property identified by the specified property index, to the specified value.
 void setBoolean(Property property, boolean value)
          Sets the value of the specified boolean property, to the specified value.
 void setBoolean(String path, boolean value)
          Sets the value of a boolean property identified by the specified path, to the specified value.
 void setByte(int propertyIndex, byte value)
          Sets the value of a byte property identified by the specified property index, to the specified value.
 void setByte(Property property, byte value)
          Sets the value of the specified byte property, to the specified value.
 void setByte(String path, byte value)
          Sets the value of a byte property identified by the specified path, to the specified value.
 void setBytes(int propertyIndex, byte[] value)
          Sets the value of a byte[] property identified by the specified property index, to the specified value.
 void setBytes(Property property, byte[] value)
          Sets the value of the specified byte[] property, to the specified value.
 void setBytes(String path, byte[] value)
          Sets the value of a byte[] property identified by the specified path, to the specified value.
 void setChar(int propertyIndex, char value)
          Sets the value of a char property identified by the specified property index, to the specified value.
 void setChar(Property property, char value)
          Sets the value of the specified char property, to the specified value.
 void setChar(String path, char value)
          Sets the value of a char property identified by the specified path, to the specified value.
 void setContainer(DataObject container)
          Sets the current container for this DataObject
 void setContainmentProperty(Property containmentProperty)
          Sets the declared reference Property within the Type for the container which is our current containment reference property
 void setDataGraph(DataGraph dataGraph)
           
 void setDataObject(int propertyIndex, DataObject value)
          Sets the value of a DataObject property identified by the specified property index, to the specified value.
 void setDataObject(Property property, DataObject value)
          Sets the value of the specified DataObject property, to the specified value.
 void setDataObject(String path, DataObject value)
          Sets the value of a DataObject property identified by the specified path, to the specified value.
 void setDate(int propertyIndex, Date value)
          Sets the value of a Date property identified by the specified property index, to the specified value.
 void setDate(Property property, Date value)
          Sets the value of the specified Date property, to the specified value.
 void setDate(String path, Date value)
          Sets the value of a Date property identified by the specified path, to the specified value.
 void setDouble(int propertyIndex, double value)
          Sets the value of a double property identified by the specified property index, to the specified value.
 void setDouble(Property property, double value)
          Sets the value of the specified double property, to the specified value.
 void setDouble(String path, double value)
          Sets the value of a double property identified by the specified path, to the specified value.
 void setFloat(int propertyIndex, float value)
          Sets the value of a float property identified by the specified property index, to the specified value.
 void setFloat(Property property, float value)
          Sets the value of the specified float property, to the specified value.
 void setFloat(String path, float value)
          Sets the value of a float property identified by the specified path, to the specified value.
 void setInt(int propertyIndex, int value)
          Sets the value of a int property identified by the specified property index, to the specified value.
 void setInt(Property property, int value)
          Sets the value of the specified int property, to the specified value.
 void setInt(String path, int value)
          Sets the value of a int property identified by the specified path, to the specified value.
 void setList(int propertyIndex, List value)
          Sets the value of a List property identified by the specified property index, to the specified value.
 void setList(Property property, List value)
          Sets the value of the specified List property, to the specified value.
 void setList(String path, List value)
          Sets the value of a List property identified by the specified path, to the specified value.
 void setLong(int propertyIndex, long value)
          Sets the value of a long property identified by the specified property index, to the specified value.
 void setLong(Property property, long value)
          Sets the value of the specified long property, to the specified value.
 void setLong(String path, long value)
          Sets the value of a long property identified by the specified path, to the specified value.
 void setShort(int propertyIndex, short value)
          Sets the value of a short property identified by the specified property index, to the specified value.
 void setShort(Property property, short value)
          Sets the value of the specified short property, to the specified value.
 void setShort(String path, short value)
          Sets the value of a short property identified by the specified path, to the specified value.
 void setString(int propertyIndex, String value)
          Sets the value of a String property identified by the specified property index, to the specified value.
 void setString(Property property, String value)
          Sets the value of the specified String property, to the specified value.
 void setString(String path, String value)
          Sets the value of a String property identified by the specified path, to the specified value.
 String toString()
           
 void unset(int propertyIndex)
          Unsets the property at the specified index in property list of this object's type.
 void unset(Property property)
          Unsets the property of the object.
 void unset(String path)
          Unsets a property of either this object or an object reachable from it, as identified by the specified path.
 String uuidFromBase64(String str)
           
 String uuidToBase64(String str)
           
 
Methods inherited from class org.plasma.sdo.core.CoreNode
getEdges, getEntityName, getValue, getValueObject, removeValue, setValue, setValueObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoreDataObject

protected CoreDataObject()
Default No-arg constructor required for serialization operations. This method is NOT intended to be used within application source code.


CoreDataObject

protected CoreDataObject(Type type,
                         CoreObject values)

CoreDataObject

public CoreDataObject(Type type)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getDataGraph

public DataGraph getDataGraph()
Returns the data graph for this object or null if there isn't one.

Specified by:
getDataGraph in interface DataObject
Returns:
the containing data graph or null.

setDataGraph

public void setDataGraph(DataGraph dataGraph)
Specified by:
setDataGraph in interface PlasmaDataObject

getChangeSummary

public ChangeSummary getChangeSummary()
Description copied from interface: DataObject
Returns the ChangeSummary with scope covering this dataObject, or null if there is no ChangeSummary.

Specified by:
getChangeSummary in interface DataObject
Returns:
the ChangeSummary with scope covering this dataObject, or null.

getRootObject

public DataObject getRootObject()
Description copied from interface: DataObject
Returns the root data object.

Specified by:
getRootObject in interface DataObject
Returns:
the root data object.

getUUID

public UUID getUUID()
Description copied from interface: PlasmaDataObject
Returns the UUID for this data object.

Specified by:
getUUID in interface PlasmaDataObject
Specified by:
getUUID in interface PlasmaNode
Returns:
the UUID for this data object.

resetUUID

public 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. Refreshes the integral hash and other elements dependent on the cached UUID.

Specified by:
resetUUID in interface PlasmaDataObject
Parameters:
uuid - the UUID

getUUIDAsString

@Deprecated
public String getUUIDAsString()
Deprecated. 

Description copied from interface: PlasmaDataObject
Returns the UUID for this data object as a character string.

Specified by:
getUUIDAsString in interface PlasmaDataObject
Specified by:
getUUIDAsString in interface PlasmaNode
Specified by:
getUUIDAsString in class CoreNode
Returns:
the UUID for this data object as a character string.

uuidToBase64

public String uuidToBase64(String str)

uuidFromBase64

public String uuidFromBase64(String str)

getDataObject

public PlasmaDataObject getDataObject()
Specified by:
getDataObject in interface PlasmaDataObject
Specified by:
getDataObject in interface PlasmaNode

createDataObject

public DataObject createDataObject(String propertyName)
Returns a new data object contained by this object using the specified property, which must be a containment property. The type of the created object is the declared type of the specified property.

Specified by:
createDataObject in interface DataObject
Parameters:
propertyName - the name of the specified containment property.
Returns:
the created data object.
See Also:
createDataObject(String, String, String)

createDataObject

public DataObject createDataObject(int propertyIndex)
Returns a new data object contained by this object using the specified property, which must be a containment property. The type of the created object is the declared type of the specified property.

Specified by:
createDataObject in interface DataObject
Parameters:
propertyIndex - the index of the specified containment property.
Returns:
the created data object.
See Also:
createDataObject(int, String, String)

createDataObject

public DataObject createDataObject(Property property)
Returns a new data object contained by this object using the specified property, which must be a containment property. The type of the created object is the declared type of the specified property.

Specified by:
createDataObject in interface DataObject
Parameters:
property - the specified containment property.
Returns:
the created data object.
See Also:
createDataObject(Property, Type)

createDataObject

public DataObject createDataObject(String propertyName,
                                   String namespaceURI,
                                   String typeName)
Returns a new data object contained by this object using the specified property, which must be a containment property. The type of the created object is specified by the packageURI and typeName arguments. The specified type must be a compatible target for the property identified by propertyName.

Specified by:
createDataObject in interface DataObject
Parameters:
propertyName - the name of the specified containment property.
namespaceURI - the namespace URI of the package containing the type of object to be created.
typeName - the name of a type in the specified package.
Returns:
the created data object.
See Also:
createDataObject(String), DataGraph.getType(java.lang.String, java.lang.String)

createDataObject

public DataObject createDataObject(int propertyIndex,
                                   String namespaceURI,
                                   String typeName)
Returns a new data object contained by this object using the specified property, which must be a containment property. The type of the created object is specified by the packageURI and typeName arguments. The specified type must be a compatible target for the property identified by propertyIndex.

Specified by:
createDataObject in interface DataObject
Parameters:
propertyIndex - the index of the specified containment property.
namespaceURI - the namespace URI of the package containing the type of object to be created.
typeName - the name of a type in the specified package.
Returns:
the created data object.
See Also:
createDataObject(int), DataGraph.getType(java.lang.String, java.lang.String)

createDataObject

public DataObject createDataObject(Property property,
                                   Type type)
Returns a new data object contained by this object using the specified property, which must be of containment type. The type of the created object is specified by the type argument, which must be a compatible target for the specified property.

Specified by:
createDataObject in interface DataObject
Parameters:
property - a containment property of this object.
type - the type of object to be created.
Returns:
the created data object.
See Also:
createDataObject(int)

setContainer

public void setContainer(DataObject container)
Description copied from interface: PlasmaDataObject
Sets the current container for this DataObject

Specified by:
setContainer in interface PlasmaDataObject

setContainmentProperty

public void setContainmentProperty(Property containmentProperty)
Description copied from interface: PlasmaDataObject
Sets the declared reference Property within the Type for the container which is our current containment reference property

Specified by:
setContainmentProperty in interface PlasmaDataObject

delete

public void delete()
Remove this object from its container and then unset all its non- readOnly properties. If this object is contained by a readOnly containment property, its non- readOnly properties will be unset but the object will not be removed from its container. All DataObjects recursively contained by containment properties will also be deleted.

Specified by:
delete in interface DataObject

contains

public boolean contains(DataObject dataObject)
Returns true if this data object is the container for the given data object.

Specified by:
contains in interface PlasmaDataObject
Parameters:
dataObject - the data object
Returns:
true if this data object is the container for the given data object

detach

public void detach()
Removes this DataObject from its data graph and container, if any. Same as getContainer().getList(getContainmentProperty()).remove(this) or getContainer().unset(getContainmentProperty()) depending on getContainmentProperty().isMany() respectively.

Specified by:
detach in interface DataObject

get

public Object get(int propertyIndex)
Description copied from interface: DataObject
Returns the value of the property at the specified index in property list of this object's type.

Specified by:
get in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the value of the specified property.
See Also:
DataObject.get(Property)

get

public Object get(Property property)
Returns the value of the given property of this object.

If the property is many-valued, the result will be a List and each object in the List will be an instance of the property's type. Otherwise the result will directly be an instance of the property's type.

Specified by:
get in interface DataObject
Parameters:
property - the property of the value to fetch.
Returns:
the value of the given property of the object.
See Also:
set(Property, Object), unset(Property), isSet(Property)

get

public Object get(String path)
Returns the value of a property of either this object or an object reachable from it, as identified by the specified path.

Specified by:
get in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the value of the specified property.
See Also:
get(Property)

set

public void set(String path,
                Object value)
Sets a property of either this object or an object or objects reachable from it, as identified by the specified path.

Specified by:
set in interface DataObject
Parameters:
path - the path to a valid object or set of objects and property.
value - the new value for the property.
See Also:
set(Property, Object)

set

public void set(int propertyIndex,
                Object value)
Conversions are specified in Java [6] and the DataHelper. The supported conversions are specified in Section 16 (DataType Conversions). Note that when calling the primitive DataObject.set() methods, no automatic conversion is performed. In this case, type conversion can be explicitly performed by calling DataHelper.convert() before calling the set() method. For example: dataObject.set(property, dataHelper.convert(property, value));

Specified by:
set in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

set

public void set(Property property,
                Object value)
Sets the value of the given property of the object to the new value.

If the property is many-valued, the new value must be a List and each object in that list must be an instance of the property's type; the existing contents are cleared and the contents of the new value are added. Otherwise the new value directly must be an instance of the property's type and it becomes the new value of the property of the object.

Specified by:
set in interface DataObject
Parameters:
property - the property of the value to set.
value - the new value for the property.
See Also:
unset(Property), isSet(Property), get(Property)

add

public void add(Property property,
                Object value)
Adds the given value to the given multi=valued property.

Specified by:
add in interface PlasmaDataObject
Parameters:
property - the multi-valued property
value - the value to add - can be a list of values

remove

public void remove(Property property,
                   Object value)
Removes the given value from this data object for the given multi-valued property.

Specified by:
remove in interface PlasmaDataObject
Parameters:
property - multi-valued the property
value - the value to remove
Throws:
UnsupportedOperationException - if the given property is not multi-valued

unset

public void unset(String path)
Unsets a property of either this object or an object reachable from it, as identified by the specified path.

Specified by:
unset in interface DataObject
Parameters:
path - the path to a valid object and property.
See Also:
unset(Property)

unset

public void unset(int propertyIndex)
Unsets the property at the specified index in property list of this object's type.

Specified by:
unset in interface DataObject
Parameters:
propertyIndex - the index of the property.
See Also:
unset(Property)

unset

public void unset(Property property)
Unsets the property of the object.

If the property is many-valued, the value must be an List and that list is cleared. Otherwise, the value of the property of the object is set to the property's default value. The property will no longer be considered set.

Specified by:
unset in interface DataObject
Parameters:
property - the property in question.
See Also:
isSet(Property), set(Property, Object), get(Property)

isSet

public boolean isSet(String path)
Description copied from interface: DataObject
Returns whether a property of either this object or an object reachable from it, as identified by the specified path, is considered to be set.

Specified by:
isSet in interface DataObject
Parameters:
path - the path to a valid object and property.
See Also:
DataObject.isSet(Property)

isSet

public boolean isSet(int propertyIndex)
Description copied from interface: DataObject
Returns whether the the property at the specified index in property list of this object's type, is considered to be set.

Specified by:
isSet in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
whether the specified property is set.
See Also:
DataObject.isSet(Property)

isSet

public boolean isSet(Property property)
Description copied from interface: DataObject
Returns whether the property of the object is considered to be set.

isSet() for many-valued Properties returns true if the List is not empty and false if the List is empty. For single-valued Properties it returns true if the Property has been set() and not unset(), and false otherwise. Any call to set() without a call to unset() will cause isSet() to return true, regardless of the value being set. For example, after calling set(property, property.getDefault()) on a previously unset property, isSet(property) will return true, even though the value of get(property) will be unchanged.

Specified by:
isSet in interface DataObject
Parameters:
property - the property in question.
Returns:
whether the property of the object is set.
See Also:
DataObject.set(Property, Object), DataObject.unset(Property), DataObject.get(Property)

getBigDecimal

public BigDecimal getBigDecimal(String path)
Description copied from interface: DataObject
Returns the value of a BigDecimal property identified by the specified path.

Specified by:
getBigDecimal in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the BigDecimal value of the specified property.
See Also:
DataObject.get(String)

getBigDecimal

public BigDecimal getBigDecimal(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a BigDecimal property identified by the specified property index.

Specified by:
getBigDecimal in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the BigDecimal value of the specified property.
See Also:
DataObject.get(int)

getBigDecimal

public BigDecimal getBigDecimal(Property property)
Description copied from interface: DataObject
Returns the value of the specified BigDecimal property.

Specified by:
getBigDecimal in interface DataObject
Parameters:
property - the property to get.
Returns:
the BigDecimal value of the specified property.
See Also:
DataObject.get(Property)

getBigInteger

public BigInteger getBigInteger(String path)
Description copied from interface: DataObject
Returns the value of a BigInteger property identified by the specified path.

Specified by:
getBigInteger in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the BigInteger value of the specified property.
See Also:
DataObject.get(String)

getBigInteger

public BigInteger getBigInteger(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a BigInteger property identified by the specified property index.

Specified by:
getBigInteger in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the BigInteger value of the specified property.
See Also:
DataObject.get(int)

getBigInteger

public BigInteger getBigInteger(Property property)
Description copied from interface: DataObject
Returns the value of the specified BigInteger property.

Specified by:
getBigInteger in interface DataObject
Parameters:
property - the property to get.
Returns:
the BigInteger value of the specified property.
See Also:
DataObject.get(Property)

getBoolean

public boolean getBoolean(String path)
Description copied from interface: DataObject
Returns the value of a boolean property identified by the specified path.

Specified by:
getBoolean in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the boolean value of the specified property.
See Also:
DataObject.get(String)

getBoolean

public boolean getBoolean(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a boolean property identified by the specified property index.

Specified by:
getBoolean in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the boolean value of the specified property.
See Also:
DataObject.get(int)

getBoolean

public boolean getBoolean(Property property)
Description copied from interface: DataObject
Returns the value of the specified boolean property.

Specified by:
getBoolean in interface DataObject
Parameters:
property - the property to get.
Returns:
the boolean value of the specified property.
See Also:
DataObject.get(Property)

getByte

public byte getByte(String path)
Description copied from interface: DataObject
Returns the value of a byte property identified by the specified path.

Specified by:
getByte in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the byte value of the specified property.
See Also:
DataObject.get(String)

getByte

public byte getByte(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a byte property identified by the specified property index.

Specified by:
getByte in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the byte value of the specified property.
See Also:
DataObject.get(int)

getByte

public byte getByte(Property property)
Description copied from interface: DataObject
Returns the value of the specified byte property.

Specified by:
getByte in interface DataObject
Parameters:
property - the property to get.
Returns:
the byte value of the specified property.
See Also:
DataObject.get(Property)

getBytes

public byte[] getBytes(String path)
Description copied from interface: DataObject
Returns the value of a byte[] property identified by the specified path.

Specified by:
getBytes in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the byte[] value of the specified property.
See Also:
DataObject.get(String)

getBytes

public byte[] getBytes(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a byte[] property identified by the specified property index.

Specified by:
getBytes in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the byte[] value of the specified property.
See Also:
DataObject.get(int)

getBytes

public byte[] getBytes(Property property)
Description copied from interface: DataObject
Returns the value of the specified byte[] property.

Specified by:
getBytes in interface DataObject
Parameters:
property - the property to get.
Returns:
the byte[] value of the specified property.
See Also:
DataObject.get(Property)

getChar

public char getChar(String path)
Description copied from interface: DataObject
Returns the value of a char property identified by the specified path.

Specified by:
getChar in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the char value of the specified property.
See Also:
DataObject.get(String)

getChar

public char getChar(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a char property identified by the specified property index.

Specified by:
getChar in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the char value of the specified property.
See Also:
DataObject.get(int)

getChar

public char getChar(Property property)
Description copied from interface: DataObject
Returns the value of the specified char property.

Specified by:
getChar in interface DataObject
Parameters:
property - the property to get.
Returns:
the char value of the specified property.
See Also:
DataObject.get(Property)

getDate

public Date getDate(String path)
Description copied from interface: DataObject
Returns the value of a Date property identified by the specified path.

Specified by:
getDate in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the Date value of the specified property.
See Also:
DataObject.get(String)

getDate

public Date getDate(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a Date property identified by the specified property index.

Specified by:
getDate in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the Date value of the specified property.
See Also:
DataObject.get(int)

getDate

public Date getDate(Property property)
Description copied from interface: DataObject
Returns the value of the specified Date property.

Specified by:
getDate in interface DataObject
Parameters:
property - the property to get.
Returns:
the Date value of the specified property.
See Also:
DataObject.get(Property)

getDouble

public double getDouble(String path)
Description copied from interface: DataObject
Returns the value of a double property identified by the specified path.

Specified by:
getDouble in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the double value of the specified property.
See Also:
DataObject.get(String)

getDouble

public double getDouble(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a double property identified by the specified property index.

Specified by:
getDouble in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the double value of the specified property.
See Also:
DataObject.get(int)

getDouble

public double getDouble(Property property)
Description copied from interface: DataObject
Returns the value of the specified double property.

Specified by:
getDouble in interface DataObject
Parameters:
property - the property to get.
Returns:
the double value of the specified property.
See Also:
DataObject.get(Property)

getFloat

public float getFloat(String path)
Description copied from interface: DataObject
Returns the value of a float property identified by the specified path.

Specified by:
getFloat in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the float value of the specified property.
See Also:
DataObject.get(String)

getFloat

public float getFloat(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a float property identified by the specified property index.

Specified by:
getFloat in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the float value of the specified property.
See Also:
DataObject.get(int)

getFloat

public float getFloat(Property property)
Description copied from interface: DataObject
Returns the value of the specified float property.

Specified by:
getFloat in interface DataObject
Parameters:
property - the property to get.
Returns:
the float value of the specified property.
See Also:
DataObject.get(Property)

getInt

public int getInt(String path)
Description copied from interface: DataObject
Returns the value of a int property identified by the specified path.

Specified by:
getInt in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the int value of the specified property.
See Also:
DataObject.get(String)

getInt

public int getInt(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a int property identified by the specified property index.

Specified by:
getInt in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the int value of the specified property.
See Also:
DataObject.get(int)

getInt

public int getInt(Property property)
Description copied from interface: DataObject
Returns the value of the specified int property.

Specified by:
getInt in interface DataObject
Parameters:
property - the property to get.
Returns:
the int value of the specified property.
See Also:
DataObject.get(Property)

getList

public List getList(String path)
Returns the value of a List property identified by the specified path.

Specified by:
getList in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the List value of the specified property.
See Also:
get(String)

getList

public List getList(int propertyIndex)
Returns the value of a List property identified by the specified property index.

Specified by:
getList in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the List value of the specified property.
See Also:
get(int)

getList

public List getList(Property property)
Returns the value of the specified List property. The List returned contains the current values. Updates through the List interface operate on the current values of the DataObject. Each access returns the same List object.

Specified by:
getList in interface DataObject
Parameters:
property - the property to get.
Returns:
the List value of the specified property.
See Also:
get(Property)

getLong

public long getLong(String path)
Description copied from interface: DataObject
Returns the value of a long property identified by the specified path.

Specified by:
getLong in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the long value of the specified property.
See Also:
DataObject.get(String)

getLong

public long getLong(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a long property identified by the specified property index.

Specified by:
getLong in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the long value of the specified property.
See Also:
DataObject.get(int)

getLong

public long getLong(Property property)
Description copied from interface: DataObject
Returns the value of the specified long property.

Specified by:
getLong in interface DataObject
Parameters:
property - the property to get.
Returns:
the long value of the specified property.
See Also:
DataObject.get(Property)

getProperty

public Property getProperty(String propertyName)
Specified by:
getProperty in interface DataObject

getShort

public short getShort(String path)
Description copied from interface: DataObject
Returns the value of a short property identified by the specified path.

Specified by:
getShort in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the short value of the specified property.
See Also:
DataObject.get(String)

getShort

public short getShort(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a short property identified by the specified property index.

Specified by:
getShort in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the short value of the specified property.
See Also:
DataObject.get(int)

getShort

public short getShort(Property property)
Description copied from interface: DataObject
Returns the value of the specified short property.

Specified by:
getShort in interface DataObject
Parameters:
property - the property to get.
Returns:
the short value of the specified property.
See Also:
DataObject.get(Property)

getString

public String getString(String path)
Description copied from interface: DataObject
Returns the value of a String property identified by the specified path.

Specified by:
getString in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the String value of the specified property.
See Also:
DataObject.get(String)

getString

public String getString(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a String property identified by the specified property index.

Specified by:
getString in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the String value of the specified property.
See Also:
DataObject.get(int)

getString

public String getString(Property property)
Description copied from interface: DataObject
Returns the value of the specified String property.

Specified by:
getString in interface DataObject
Parameters:
property - the property to get.
Returns:
the String value of the specified property.
See Also:
DataObject.get(Property)

getType

public Type getType()
Description copied from interface: DataObject
Returns the data object's type.

The type defines the Properties available for reflective access.

Specified by:
getType in interface DataObject
Returns:
the type.

setBigDecimal

public void setBigDecimal(String path,
                          BigDecimal value)
Description copied from interface: DataObject
Sets the value of a BigDecimal property identified by the specified path, to the specified value.

Specified by:
setBigDecimal in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setBigDecimal

public void setBigDecimal(int propertyIndex,
                          BigDecimal value)
Description copied from interface: DataObject
Sets the value of a BigDecimal property identified by the specified property index, to the specified value.

Specified by:
setBigDecimal in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setBigDecimal

public void setBigDecimal(Property property,
                          BigDecimal value)
Description copied from interface: DataObject
Sets the value of the specified BigDecimal property, to the specified value.

Specified by:
setBigDecimal in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setBigInteger

public void setBigInteger(String path,
                          BigInteger value)
Description copied from interface: DataObject
Sets the value of a BigInteger property identified by the specified path, to the specified value.

Specified by:
setBigInteger in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setBigInteger

public void setBigInteger(int propertyIndex,
                          BigInteger value)
Description copied from interface: DataObject
Sets the value of a BigInteger property identified by the specified property index, to the specified value.

Specified by:
setBigInteger in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setBigInteger

public void setBigInteger(Property property,
                          BigInteger value)
Description copied from interface: DataObject
Sets the value of the specified BigInteger property, to the specified value.

Specified by:
setBigInteger in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setBoolean

public void setBoolean(String path,
                       boolean value)
Description copied from interface: DataObject
Sets the value of a boolean property identified by the specified path, to the specified value.

Specified by:
setBoolean in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setBoolean

public void setBoolean(int propertyIndex,
                       boolean value)
Description copied from interface: DataObject
Sets the value of a boolean property identified by the specified property index, to the specified value.

Specified by:
setBoolean in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setBoolean

public void setBoolean(Property property,
                       boolean value)
Description copied from interface: DataObject
Sets the value of the specified boolean property, to the specified value.

Specified by:
setBoolean in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setByte

public void setByte(String path,
                    byte value)
Description copied from interface: DataObject
Sets the value of a byte property identified by the specified path, to the specified value.

Specified by:
setByte in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setByte

public void setByte(int propertyIndex,
                    byte value)
Description copied from interface: DataObject
Sets the value of a byte property identified by the specified property index, to the specified value.

Specified by:
setByte in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setByte

public void setByte(Property property,
                    byte value)
Description copied from interface: DataObject
Sets the value of the specified byte property, to the specified value.

Specified by:
setByte in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setBytes

public void setBytes(String path,
                     byte[] value)
Description copied from interface: DataObject
Sets the value of a byte[] property identified by the specified path, to the specified value.

Specified by:
setBytes in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setBytes

public void setBytes(int propertyIndex,
                     byte[] value)
Description copied from interface: DataObject
Sets the value of a byte[] property identified by the specified property index, to the specified value.

Specified by:
setBytes in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setBytes

public void setBytes(Property property,
                     byte[] value)
Description copied from interface: DataObject
Sets the value of the specified byte[] property, to the specified value.

Specified by:
setBytes in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setChar

public void setChar(String path,
                    char value)
Description copied from interface: DataObject
Sets the value of a char property identified by the specified path, to the specified value.

Specified by:
setChar in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setChar

public void setChar(int propertyIndex,
                    char value)
Description copied from interface: DataObject
Sets the value of a char property identified by the specified property index, to the specified value.

Specified by:
setChar in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setChar

public void setChar(Property property,
                    char value)
Description copied from interface: DataObject
Sets the value of the specified char property, to the specified value.

Specified by:
setChar in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setDataObject

public void setDataObject(String path,
                          DataObject value)
Description copied from interface: DataObject
Sets the value of a DataObject property identified by the specified path, to the specified value.

Specified by:
setDataObject in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setDataObject

public void setDataObject(int propertyIndex,
                          DataObject value)
Description copied from interface: DataObject
Sets the value of a DataObject property identified by the specified property index, to the specified value.

Specified by:
setDataObject in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setDataObject

public void setDataObject(Property property,
                          DataObject value)
Description copied from interface: DataObject
Sets the value of the specified DataObject property, to the specified value.

Specified by:
setDataObject in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setDate

public void setDate(String path,
                    Date value)
Description copied from interface: DataObject
Sets the value of a Date property identified by the specified path, to the specified value.

Specified by:
setDate in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setDate

public void setDate(int propertyIndex,
                    Date value)
Description copied from interface: DataObject
Sets the value of a Date property identified by the specified property index, to the specified value.

Specified by:
setDate in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setDate

public void setDate(Property property,
                    Date value)
Description copied from interface: DataObject
Sets the value of the specified Date property, to the specified value.

Specified by:
setDate in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setDouble

public void setDouble(String path,
                      double value)
Description copied from interface: DataObject
Sets the value of a double property identified by the specified path, to the specified value.

Specified by:
setDouble in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setDouble

public void setDouble(int propertyIndex,
                      double value)
Description copied from interface: DataObject
Sets the value of a double property identified by the specified property index, to the specified value.

Specified by:
setDouble in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setDouble

public void setDouble(Property property,
                      double value)
Description copied from interface: DataObject
Sets the value of the specified double property, to the specified value.

Specified by:
setDouble in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setFloat

public void setFloat(String path,
                     float value)
Description copied from interface: DataObject
Sets the value of a float property identified by the specified path, to the specified value.

Specified by:
setFloat in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setFloat

public void setFloat(int propertyIndex,
                     float value)
Description copied from interface: DataObject
Sets the value of a float property identified by the specified property index, to the specified value.

Specified by:
setFloat in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setFloat

public void setFloat(Property property,
                     float value)
Description copied from interface: DataObject
Sets the value of the specified float property, to the specified value.

Specified by:
setFloat in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setInt

public void setInt(String path,
                   int value)
Description copied from interface: DataObject
Sets the value of a int property identified by the specified path, to the specified value.

Specified by:
setInt in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setInt

public void setInt(int propertyIndex,
                   int value)
Description copied from interface: DataObject
Sets the value of a int property identified by the specified property index, to the specified value.

Specified by:
setInt in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setInt

public void setInt(Property property,
                   int value)
Description copied from interface: DataObject
Sets the value of the specified int property, to the specified value.

Specified by:
setInt in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setList

public void setList(String path,
                    List value)
Description copied from interface: DataObject
Sets the value of a List property identified by the specified path, to the specified value.

Specified by:
setList in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object), DataObject.setList(Property, List)

setList

public void setList(int propertyIndex,
                    List value)
Description copied from interface: DataObject
Sets the value of a List property identified by the specified property index, to the specified value.

Specified by:
setList in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object), DataObject.setList(Property, List)

setList

public void setList(Property property,
                    List value)
Description copied from interface: DataObject
Sets the value of the specified List property, to the specified value.

The new value must be a List and each object in that list must be an instance of the property's type; the existing contents are cleared and the contents of the new value are added.

Specified by:
setList in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setLong

public void setLong(String path,
                    long value)
Description copied from interface: DataObject
Sets the value of a long property identified by the specified path, to the specified value.

Specified by:
setLong in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setLong

public void setLong(int propertyIndex,
                    long value)
Description copied from interface: DataObject
Sets the value of a long property identified by the specified property index, to the specified value.

Specified by:
setLong in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setLong

public void setLong(Property property,
                    long value)
Description copied from interface: DataObject
Sets the value of the specified long property, to the specified value.

Specified by:
setLong in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setShort

public void setShort(String path,
                     short value)
Description copied from interface: DataObject
Sets the value of a short property identified by the specified path, to the specified value.

Specified by:
setShort in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setShort

public void setShort(int propertyIndex,
                     short value)
Description copied from interface: DataObject
Sets the value of a short property identified by the specified property index, to the specified value.

Specified by:
setShort in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setShort

public void setShort(Property property,
                     short value)
Description copied from interface: DataObject
Sets the value of the specified short property, to the specified value.

Specified by:
setShort in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

setString

public void setString(String path,
                      String value)
Description copied from interface: DataObject
Sets the value of a String property identified by the specified path, to the specified value.

Specified by:
setString in interface DataObject
Parameters:
path - the path to a valid object and property.
value - the new value for the property.
See Also:
#setProperty(String, Object)

setString

public void setString(int propertyIndex,
                      String value)
Description copied from interface: DataObject
Sets the value of a String property identified by the specified property index, to the specified value.

Specified by:
setString in interface DataObject
Parameters:
propertyIndex - the index of the property.
value - the new value for the property.
See Also:
DataObject.set(int, Object)

setString

public void setString(Property property,
                      String value)
Description copied from interface: DataObject
Sets the value of the specified String property, to the specified value.

Specified by:
setString in interface DataObject
Parameters:
property - the property to set.
value - the new value for the property.
See Also:
DataObject.set(Property, Object)

getContainer

public DataObject getContainer()
Returns the containing data object or null if there is no container.

Specified by:
getContainer in interface DataObject
Returns:
the containing data object or null.

getContainmentProperty

public Property getContainmentProperty()
Return the Property of the data object containing this data object or null if there is no container.

Specified by:
getContainmentProperty in interface DataObject
Returns:
the property containing this data object.

getDataObject

public DataObject getDataObject(String path)
Description copied from interface: DataObject
Returns the value of a DataObject property identified by the specified path.

Specified by:
getDataObject in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the DataObject value of the specified property.
See Also:
DataObject.get(String)

getDataObject

public DataObject getDataObject(int propertyIndex)
Description copied from interface: DataObject
Returns the value of a DataObject property identified by the specified property index.

Specified by:
getDataObject in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the DataObject value of the specified property.
See Also:
DataObject.get(int)

getDataObject

public DataObject getDataObject(Property property)
Description copied from interface: DataObject
Returns the value of the specified DataObject property.

Specified by:
getDataObject in interface DataObject
Parameters:
property - the property to get.
Returns:
the DataObject value of the specified property.
See Also:
DataObject.get(Property)

getInstanceProperties

public List getInstanceProperties()
Returns a read-only List of the Properties currently used in this DataObject. This list will contain all of the Properties in getType().getProperties() and any Properties where isSet(property) is true. For example, Properties resulting from the use of open or mixed XML content are present if allowed by the Type. the List does not contain duplicates. The order of the Properties in the List begins with getType().getProperties() and the order of the remaining Properties is determined by the implementation. The same list will be returned unless the DataObject is updated so that the contents of the List change.

Specified by:
getInstanceProperties in interface DataObject
Returns:
the List of Properties currently used in this DataObject.

getInstanceProperty

public Property getInstanceProperty(String propertyName)
Returns the named Property from the current instance properties, or null if not found. The instance properties are getInstanceProperties().

Specified by:
getInstanceProperty in interface DataObject
Parameters:
propertyName - the name of the Property
Returns:
the named Property from the DataObject's current instance properties, or null.

getSequence

public Sequence getSequence(String path)
Deprecated. in 2.1.0.

Specified by:
getSequence in interface DataObject
Parameters:
path - the path to a valid object and property.
Returns:
the Sequence value of the specified property.
See Also:
Returns the value of a Sequence property identified by the specified path. An implementation may throw an UnsupportedOperationException., get(String)

getSequence

public Sequence getSequence(int propertyIndex)
Deprecated. in 2.1.0.

Specified by:
getSequence in interface DataObject
Parameters:
propertyIndex - the index of the property.
Returns:
the Sequence value of the specified property.
See Also:
Returns the value of a Sequence property identified by the specified property index. An implementation may throw an UnsupportedOperationException., get(int)

getSequence

public Sequence getSequence(Property property)
Deprecated. in 2.1.0.

Specified by:
getSequence in interface DataObject
Parameters:
property - the property to get.
Returns:
the Sequence value of the specified property.
See Also:
Returns the value of the specified Sequence property. An implementation may throw an UnsupportedOperationException., get(Property)

getSequence

public Sequence getSequence()
Returns the Sequence for this DataObject. When getType().isSequencedType() == true, the Sequence of a DataObject corresponds to the XML elements representing the values of its Properties. Updates through DataObject and the Lists or Sequences returned from DataObject operate on the same data. When getType().isSequencedType() == false, null is returned.

Specified by:
getSequence in interface DataObject
Returns:
the Sequence or null.

reset

public void reset(SnapshotMap idMap,
                  String username)
Sync up 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.

Specified by:
reset in interface PlasmaDataObject
Parameters:
idMap - - the hash of UUID's mapped to newly inserted pk's
username - - the user who committed the modifications.

remove

public void remove()
Specified by:
remove in interface PlasmaDataObject

accept

public 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.

Specified by:
accept in interface PlasmaDataObject
Specified by:
accept in interface PlasmaNode
Parameters:
visitor - the graph visitor receiving traversal events
See Also:
DataGraph, DataObject, PlasmaDataGraph, PlasmaDataObject, PlasmaDataGraphVisitor.visit()

accept

public 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.

Specified by:
accept in interface PlasmaDataObject
Parameters:
visitor - the graph visitor receiving traversal events
maxLevel - the maximum number of "hierarchical" levels to traverse
See Also:
DataGraph, DataObject, PlasmaDataGraph, PlasmaDataObject, PlasmaDataGraphVisitor.visit()

acceptDepthFirst

public 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.

Specified by:
acceptDepthFirst in interface PlasmaDataObject
Specified by:
acceptDepthFirst in interface PlasmaNode
Parameters:
visitor - the graph visitor receiving traversal events
See Also:
DataGraph, DataObject, PlasmaDataGraph, PlasmaDataObject, PlasmaDataGraphVisitor.visit()

accept

public 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.

Specified by:
accept in interface PlasmaDataObject
Specified by:
accept in interface PlasmaNode
Parameters:
visitor - the graph visitor receiving traversal events
See Also:
DataGraph, DataObject, PlasmaDataGraph, PlasmaDataObject, PlasmaDataGraphVisitor.visit()

find

public DataObject find(String key)
Specified by:
find in interface PlasmaDataObject

toString

public String toString()
Overrides:
toString in class Object

dump

public String dump()
Specified by:
dump in interface PlasmaDataObject

dumpDepthFirst

public String dumpDepthFirst()
Specified by:
dumpDepthFirst in interface PlasmaDataObject


Copyright © 2014. All rights reserved.