-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
SDODataObject,SDOPropertyType.PropertyImpl,SDOTypeType.TypeImpl,SDOWrapperType.BooleanObjectWrapperImpl,SDOWrapperType.BooleanWrapperImpl,SDOWrapperType.ByteObjectWrapperImpl,SDOWrapperType.Bytes_hexBunaryWrapperImpl,SDOWrapperType.BytesWrapperImpl,SDOWrapperType.ByteWrapperImpl,SDOWrapperType.CharacterObjectWrapperImpl,SDOWrapperType.CharacterWrapperImpl,SDOWrapperType.DateTimeWrapperImpl,SDOWrapperType.DateWrapperImpl,SDOWrapperType.DayWrapperImpl,SDOWrapperType.DecimalWrapperImpl,SDOWrapperType.DoubleObjectWrapperImpl,SDOWrapperType.DoubleWrapperImpl,SDOWrapperType.DurationWrapperImpl,SDOWrapperType.FloatObjectWrapperImpl,SDOWrapperType.FloatWrapperImpl,SDOWrapperType.IntegerWrapperImpl,SDOWrapperType.IntObjectWrapperImpl,SDOWrapperType.IntWrapperImpl,SDOWrapperType.LongObjectWrapperImpl,SDOWrapperType.LongWrapperImpl,SDOWrapperType.MonthDayWrapperImpl,SDOWrapperType.MonthWrapperImpl,SDOWrapperType.ObjectWrapperImpl,SDOWrapperType.ShortObjectWrapperImpl,SDOWrapperType.ShortWrapperImpl,SDOWrapperType.StringsWrapperImpl,SDOWrapperType.StringWrapperImpl,SDOWrapperType.TimeWrapperImpl,SDOWrapperType.URI_QNameWrapperImpl,SDOWrapperType.URIWrapperImpl,SDOWrapperType.YearMonthDayWrapperImpl,SDOWrapperType.YearMonthWrapperImpl,SDOWrapperType.YearWrapperImpl
public interface DataObject extends Serializable
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 objectitself, 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 objectThere are general accessors for Properties, i.e.,
getandset, as well as specific accessors for the primitive types and commonly used data types like String, Date, List, BigInteger, and BigDecimal.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description DataObjectcreateDataObject(int propertyIndex)Returns a newdata objectcontained by this object using the specified property, which must be acontainment property.DataObjectcreateDataObject(int propertyIndex, String namespaceURI, String typeName)Returns a newdata objectcontained by this object using the specified property, which must be acontainment property.DataObjectcreateDataObject(Property property)Returns a newdata objectcontained by this object using the specified property, which must be acontainment property.DataObjectcreateDataObject(Property property, Type type)Returns a newdata objectcontained by this object using the specified property, which must be ofcontainment type.DataObjectcreateDataObject(String propertyName)Returns a newdata objectcontained by this object using the specified property, which must be acontainment property.DataObjectcreateDataObject(String propertyName, String namespaceURI, String typeName)Returns a newdata objectcontained by this object using the specified property, which must be acontainment property.voiddelete()Remove this object from its container and then unset all its non-readOnlyProperties.voiddetach()Removes this DataObject from its container, if any.Objectget(int propertyIndex)Returns the value of the property at the specified index inproperty listof this object'stype.Objectget(Property property)Returns the value of the given property of this object.Objectget(String path)Returns the value of a property of either this object or an object reachable from it, as identified by the specified path.BigDecimalgetBigDecimal(int propertyIndex)Returns the value of aBigDecimalproperty identified by the specified property index.BigDecimalgetBigDecimal(Property property)Returns the value of the specifiedBigDecimalproperty.BigDecimalgetBigDecimal(String path)Returns the value of aBigDecimalproperty identified by the specified path.BigIntegergetBigInteger(int propertyIndex)Returns the value of aBigIntegerproperty identified by the specified property index.BigIntegergetBigInteger(Property property)Returns the value of the specifiedBigIntegerproperty.BigIntegergetBigInteger(String path)Returns the value of aBigIntegerproperty identified by the specified path.booleangetBoolean(int propertyIndex)Returns the value of abooleanproperty identified by the specified property index.booleangetBoolean(Property property)Returns the value of the specifiedbooleanproperty.booleangetBoolean(String path)Returns the value of abooleanproperty identified by the specified path.bytegetByte(int propertyIndex)Returns the value of abyteproperty identified by the specified property index.bytegetByte(Property property)Returns the value of the specifiedbyteproperty.bytegetByte(String path)Returns the value of abyteproperty identified by the specified path.byte[]getBytes(int propertyIndex)Returns the value of abyte[]property identified by the specified property index.byte[]getBytes(Property property)Returns the value of the specifiedbyte[]property.byte[]getBytes(String path)Returns the value of abyte[]property identified by the specified path.ChangeSummarygetChangeSummary()Returns the ChangeSummary with scope covering this dataObject, or null if there is no ChangeSummary.chargetChar(int propertyIndex)Returns the value of acharproperty identified by the specified property index.chargetChar(Property property)Returns the value of the specifiedcharproperty.chargetChar(String path)Returns the value of acharproperty identified by the specified path.DataObjectgetContainer()Returns the containingdata objectornullif there is no container.PropertygetContainmentProperty()Return the Property of thedata objectcontaining this data object ornullif there is no container.DataGraphgetDataGraph()Deprecated.DataObjectgetDataObject(int propertyIndex)Returns the value of aDataObjectproperty identified by the specified property index.DataObjectgetDataObject(Property property)Returns the value of the specifiedDataObjectproperty.DataObjectgetDataObject(String path)Returns the value of aDataObjectproperty identified by the specified path.DategetDate(int propertyIndex)Returns the value of aDateproperty identified by the specified property index.DategetDate(Property property)Returns the value of the specifiedDateproperty.DategetDate(String path)Returns the value of aDateproperty identified by the specified path.doublegetDouble(int propertyIndex)Returns the value of adoubleproperty identified by the specified property index.doublegetDouble(Property property)Returns the value of the specifieddoubleproperty.doublegetDouble(String path)Returns the value of adoubleproperty identified by the specified path.floatgetFloat(int propertyIndex)Returns the value of afloatproperty identified by the specified property index.floatgetFloat(Property property)Returns the value of the specifiedfloatproperty.floatgetFloat(String path)Returns the value of afloatproperty identified by the specified path.ListgetInstanceProperties()Returns a read-only List of the Properties currently used in this DataObject.PropertygetInstanceProperty(String propertyName)Returns the named Property from the current instance properties, or null if not found.intgetInt(int propertyIndex)Returns the value of aintproperty identified by the specified property index.intgetInt(Property property)Returns the value of the specifiedintproperty.intgetInt(String path)Returns the value of aintproperty identified by the specified path.ListgetList(int propertyIndex)Returns the value of aListproperty identified by the specified property index.ListgetList(Property property)Returns the value of the specifiedListproperty.ListgetList(String path)Returns the value of aListproperty identified by the specified path.longgetLong(int propertyIndex)Returns the value of alongproperty identified by the specified property index.longgetLong(Property property)Returns the value of the specifiedlongproperty.longgetLong(String path)Returns the value of alongproperty identified by the specified path.PropertygetProperty(String propertyName)Deprecated.replaced bygetInstanceProperty(String)in 2.1.0DataObjectgetRootObject()Returns the rootdata object.SequencegetSequence()Returns theSequencefor this DataObject.SequencegetSequence(int propertyIndex)Deprecated.in 2.1.0.SequencegetSequence(Property property)Deprecated.in 2.1.0.SequencegetSequence(String path)Deprecated.in 2.1.0.shortgetShort(int propertyIndex)Returns the value of ashortproperty identified by the specified property index.shortgetShort(Property property)Returns the value of the specifiedshortproperty.shortgetShort(String path)Returns the value of ashortproperty identified by the specified path.StringgetString(int propertyIndex)Returns the value of aStringproperty identified by the specified property index.StringgetString(Property property)Returns the value of the specifiedStringproperty.StringgetString(String path)Returns the value of aStringproperty identified by the specified path.TypegetType()Returns the data object's type.booleanisSet(int propertyIndex)Returns whether the the property at the specified index inproperty listof this object'stype, is considered to be set.booleanisSet(Property property)Returns whether the property of the object is considered to be set.booleanisSet(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.voidset(int propertyIndex, Object value)Sets the property at the specified index inproperty listof this object'stype, to the specified value.voidset(Property property, Object value)Sets the value of the given property of the object to the new value.voidset(String path, Object value)Sets a property of either this object or an object reachable from it, as identified by the specified path, to the specified value.voidsetBigDecimal(int propertyIndex, BigDecimal value)Sets the value of aBigDecimalproperty identified by the specified property index, to the specified value.voidsetBigDecimal(Property property, BigDecimal value)Sets the value of the specifiedBigDecimalproperty, to the specified value.voidsetBigDecimal(String path, BigDecimal value)Sets the value of aBigDecimalproperty identified by the specified path, to the specified value.voidsetBigInteger(int propertyIndex, BigInteger value)Sets the value of aBigIntegerproperty identified by the specified property index, to the specified value.voidsetBigInteger(Property property, BigInteger value)Sets the value of the specifiedBigIntegerproperty, to the specified value.voidsetBigInteger(String path, BigInteger value)Sets the value of aBigIntegerproperty identified by the specified path, to the specified value.voidsetBoolean(int propertyIndex, boolean value)Sets the value of abooleanproperty identified by the specified property index, to the specified value.voidsetBoolean(Property property, boolean value)Sets the value of the specifiedbooleanproperty, to the specified value.voidsetBoolean(String path, boolean value)Sets the value of abooleanproperty identified by the specified path, to the specified value.voidsetByte(int propertyIndex, byte value)Sets the value of abyteproperty identified by the specified property index, to the specified value.voidsetByte(Property property, byte value)Sets the value of the specifiedbyteproperty, to the specified value.voidsetByte(String path, byte value)Sets the value of abyteproperty identified by the specified path, to the specified value.voidsetBytes(int propertyIndex, byte[] value)Sets the value of abyte[]property identified by the specified property index, to the specified value.voidsetBytes(Property property, byte[] value)Sets the value of the specifiedbyte[]property, to the specified value.voidsetBytes(String path, byte[] value)Sets the value of abyte[]property identified by the specified path, to the specified value.voidsetChar(int propertyIndex, char value)Sets the value of acharproperty identified by the specified property index, to the specified value.voidsetChar(Property property, char value)Sets the value of the specifiedcharproperty, to the specified value.voidsetChar(String path, char value)Sets the value of acharproperty identified by the specified path, to the specified value.voidsetDataObject(int propertyIndex, DataObject value)Sets the value of aDataObjectproperty identified by the specified property index, to the specified value.voidsetDataObject(Property property, DataObject value)Sets the value of the specifiedDataObjectproperty, to the specified value.voidsetDataObject(String path, DataObject value)Sets the value of aDataObjectproperty identified by the specified path, to the specified value.voidsetDate(int propertyIndex, Date value)Sets the value of aDateproperty identified by the specified property index, to the specified value.voidsetDate(Property property, Date value)Sets the value of the specifiedDateproperty, to the specified value.voidsetDate(String path, Date value)Sets the value of aDateproperty identified by the specified path, to the specified value.voidsetDouble(int propertyIndex, double value)Sets the value of adoubleproperty identified by the specified property index, to the specified value.voidsetDouble(Property property, double value)Sets the value of the specifieddoubleproperty, to the specified value.voidsetDouble(String path, double value)Sets the value of adoubleproperty identified by the specified path, to the specified value.voidsetFloat(int propertyIndex, float value)Sets the value of afloatproperty identified by the specified property index, to the specified value.voidsetFloat(Property property, float value)Sets the value of the specifiedfloatproperty, to the specified value.voidsetFloat(String path, float value)Sets the value of afloatproperty identified by the specified path, to the specified value.voidsetInt(int propertyIndex, int value)Sets the value of aintproperty identified by the specified property index, to the specified value.voidsetInt(Property property, int value)Sets the value of the specifiedintproperty, to the specified value.voidsetInt(String path, int value)Sets the value of aintproperty identified by the specified path, to the specified value.voidsetList(int propertyIndex, List value)Sets the value of aListproperty identified by the specified property index, to the specified value.voidsetList(Property property, List value)Sets the value of the specifiedListproperty, to the specified value.voidsetList(String path, List value)Sets the value of aListproperty identified by the specified path, to the specified value.voidsetLong(int propertyIndex, long value)Sets the value of alongproperty identified by the specified property index, to the specified value.voidsetLong(Property property, long value)Sets the value of the specifiedlongproperty, to the specified value.voidsetLong(String path, long value)Sets the value of alongproperty identified by the specified path, to the specified value.voidsetShort(int propertyIndex, short value)Sets the value of ashortproperty identified by the specified property index, to the specified value.voidsetShort(Property property, short value)Sets the value of the specifiedshortproperty, to the specified value.voidsetShort(String path, short value)Sets the value of ashortproperty identified by the specified path, to the specified value.voidsetString(int propertyIndex, String value)Sets the value of aStringproperty identified by the specified property index, to the specified value.voidsetString(Property property, String value)Sets the value of the specifiedStringproperty, to the specified value.voidsetString(String path, String value)Sets the value of aStringproperty identified by the specified path, to the specified value.voidunset(int propertyIndex)Unsets the property at the specified index inproperty listof this object'stype.voidunset(Property property)Unsets the property of the object.voidunset(String path)Unsets a property of either this object or an object reachable from it, as identified by the specified path.
-
-
-
Method Detail
-
get
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.- Parameters:
path- the path to a valid object and property.- Returns:
- the value of the specified property.
- See Also:
get(Property)
-
set
void set(String path, Object value)
Sets a property of either this object or an object reachable from it, as identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(Property, Object)
-
isSet
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.- Parameters:
path- the path to a valid object and property.- See Also:
isSet(Property)
-
unset
void unset(String path)
Unsets a property of either this object or an object reachable from it, as identified by the specified path.- Parameters:
path- the path to a valid object and property.- See Also:
unset(Property)
-
getBoolean
boolean getBoolean(String path)
Returns the value of abooleanproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
booleanvalue of the specified property. - See Also:
get(String)
-
getByte
byte getByte(String path)
Returns the value of abyteproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
bytevalue of the specified property. - See Also:
get(String)
-
getChar
char getChar(String path)
Returns the value of acharproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
charvalue of the specified property. - See Also:
get(String)
-
getDouble
double getDouble(String path)
Returns the value of adoubleproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
doublevalue of the specified property. - See Also:
get(String)
-
getFloat
float getFloat(String path)
Returns the value of afloatproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
floatvalue of the specified property. - See Also:
get(String)
-
getInt
int getInt(String path)
Returns the value of aintproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
intvalue of the specified property. - See Also:
get(String)
-
getLong
long getLong(String path)
Returns the value of alongproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
longvalue of the specified property. - See Also:
get(String)
-
getShort
short getShort(String path)
Returns the value of ashortproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
shortvalue of the specified property. - See Also:
get(String)
-
getBytes
byte[] getBytes(String path)
Returns the value of abyte[]property identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
byte[]value of the specified property. - See Also:
get(String)
-
getBigDecimal
BigDecimal getBigDecimal(String path)
Returns the value of aBigDecimalproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
BigDecimalvalue of the specified property. - See Also:
get(String)
-
getBigInteger
BigInteger getBigInteger(String path)
Returns the value of aBigIntegerproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
BigIntegervalue of the specified property. - See Also:
get(String)
-
getDataObject
DataObject getDataObject(String path)
Returns the value of aDataObjectproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
DataObjectvalue of the specified property. - See Also:
get(String)
-
getDate
Date getDate(String path)
Returns the value of aDateproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
Datevalue of the specified property. - See Also:
get(String)
-
getString
String getString(String path)
Returns the value of aStringproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
Stringvalue of the specified property. - See Also:
get(String)
-
getList
List getList(String path)
Returns the value of aListproperty identified by the specified path.- Parameters:
path- the path to a valid object and property.- Returns:
- the
Listvalue of the specified property. - See Also:
get(String)
-
getSequence
Sequence getSequence(String path)
Deprecated.in 2.1.0.- Parameters:
path- the path to a valid object and property.- Returns:
- the
Sequencevalue 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)
-
setBoolean
void setBoolean(String path, boolean value)
Sets the value of abooleanproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setByte
void setByte(String path, byte value)
Sets the value of abyteproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setChar
void setChar(String path, char value)
Sets the value of acharproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setDouble
void setDouble(String path, double value)
Sets the value of adoubleproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setFloat
void setFloat(String path, float value)
Sets the value of afloatproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setInt
void setInt(String path, int value)
Sets the value of aintproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setLong
void setLong(String path, long value)
Sets the value of alongproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setShort
void setShort(String path, short value)
Sets the value of ashortproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setBytes
void setBytes(String path, byte[] value)
Sets the value of abyte[]property identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setBigDecimal
void setBigDecimal(String path, BigDecimal value)
Sets the value of aBigDecimalproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setBigInteger
void setBigInteger(String path, BigInteger value)
Sets the value of aBigIntegerproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setDataObject
void setDataObject(String path, DataObject value)
Sets the value of aDataObjectproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setDate
void setDate(String path, Date value)
Sets the value of aDateproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setString
void setString(String path, String value)
Sets the value of aStringproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object)
-
setList
void setList(String path, List value)
Sets the value of aListproperty identified by the specified path, to the specified value.- Parameters:
path- the path to a valid object and property.value- the new value for the property.- See Also:
set(String, Object),setList(Property, List)
-
get
Object get(int propertyIndex)
Returns the value of the property at the specified index inproperty listof this object'stype.- Parameters:
propertyIndex- the index of the property.- Returns:
- the value of the specified property.
- See Also:
get(Property)
-
set
void set(int propertyIndex, Object value)Sets the property at the specified index inproperty listof this object'stype, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(Property, Object)
-
isSet
boolean isSet(int propertyIndex)
Returns whether the the property at the specified index inproperty listof this object'stype, is considered to be set.- Parameters:
propertyIndex- the index of the property.- Returns:
- whether the specified property is set.
- See Also:
isSet(Property)
-
unset
void unset(int propertyIndex)
Unsets the property at the specified index inproperty listof this object'stype.- Parameters:
propertyIndex- the index of the property.- See Also:
unset(Property)
-
getBoolean
boolean getBoolean(int propertyIndex)
Returns the value of abooleanproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
booleanvalue of the specified property. - See Also:
get(int)
-
getByte
byte getByte(int propertyIndex)
Returns the value of abyteproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
bytevalue of the specified property. - See Also:
get(int)
-
getChar
char getChar(int propertyIndex)
Returns the value of acharproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
charvalue of the specified property. - See Also:
get(int)
-
getDouble
double getDouble(int propertyIndex)
Returns the value of adoubleproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
doublevalue of the specified property. - See Also:
get(int)
-
getFloat
float getFloat(int propertyIndex)
Returns the value of afloatproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
floatvalue of the specified property. - See Also:
get(int)
-
getInt
int getInt(int propertyIndex)
Returns the value of aintproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
intvalue of the specified property. - See Also:
get(int)
-
getLong
long getLong(int propertyIndex)
Returns the value of alongproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
longvalue of the specified property. - See Also:
get(int)
-
getShort
short getShort(int propertyIndex)
Returns the value of ashortproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
shortvalue of the specified property. - See Also:
get(int)
-
getBytes
byte[] getBytes(int propertyIndex)
Returns the value of abyte[]property identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
byte[]value of the specified property. - See Also:
get(int)
-
getBigDecimal
BigDecimal getBigDecimal(int propertyIndex)
Returns the value of aBigDecimalproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
BigDecimalvalue of the specified property. - See Also:
get(int)
-
getBigInteger
BigInteger getBigInteger(int propertyIndex)
Returns the value of aBigIntegerproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
BigIntegervalue of the specified property. - See Also:
get(int)
-
getDataObject
DataObject getDataObject(int propertyIndex)
Returns the value of aDataObjectproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
DataObjectvalue of the specified property. - See Also:
get(int)
-
getDate
Date getDate(int propertyIndex)
Returns the value of aDateproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
Datevalue of the specified property. - See Also:
get(int)
-
getString
String getString(int propertyIndex)
Returns the value of aStringproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
Stringvalue of the specified property. - See Also:
get(int)
-
getList
List getList(int propertyIndex)
Returns the value of aListproperty identified by the specified property index.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
Listvalue of the specified property. - See Also:
get(int)
-
getSequence
Sequence getSequence(int propertyIndex)
Deprecated.in 2.1.0.- Parameters:
propertyIndex- the index of the property.- Returns:
- the
Sequencevalue 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)
-
setBoolean
void setBoolean(int propertyIndex, boolean value)Sets the value of abooleanproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setByte
void setByte(int propertyIndex, byte value)Sets the value of abyteproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setChar
void setChar(int propertyIndex, char value)Sets the value of acharproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setDouble
void setDouble(int propertyIndex, double value)Sets the value of adoubleproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setFloat
void setFloat(int propertyIndex, float value)Sets the value of afloatproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setInt
void setInt(int propertyIndex, int value)Sets the value of aintproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setLong
void setLong(int propertyIndex, long value)Sets the value of alongproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setShort
void setShort(int propertyIndex, short value)Sets the value of ashortproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setBytes
void setBytes(int propertyIndex, byte[] value)Sets the value of abyte[]property identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setBigDecimal
void setBigDecimal(int propertyIndex, BigDecimal value)Sets the value of aBigDecimalproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setBigInteger
void setBigInteger(int propertyIndex, BigInteger value)Sets the value of aBigIntegerproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setDataObject
void setDataObject(int propertyIndex, DataObject value)Sets the value of aDataObjectproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setDate
void setDate(int propertyIndex, Date value)Sets the value of aDateproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setString
void setString(int propertyIndex, String value)Sets the value of aStringproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object)
-
setList
void setList(int propertyIndex, List value)Sets the value of aListproperty identified by the specified property index, to the specified value.- Parameters:
propertyIndex- the index of the property.value- the new value for the property.- See Also:
set(int, Object),setList(Property, List)
-
get
Object get(Property property)
Returns the value of the given property of this object.If the property is
many-valued, the result will be aListand each object in the List will bean instance ofthe property'stype. Otherwise the result will directly be an instance of the property's type.- 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)
-
set
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 aListand each object in that list must bean instance ofthe property'stype; 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.- Parameters:
property- the property of the value to set.value- the new value for the property.- See Also:
unset(Property),isSet(Property),get(Property)
-
isSet
boolean isSet(Property property)
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.
- Parameters:
property- the property in question.- Returns:
- whether the property of the object is set.
- See Also:
set(Property, Object),unset(Property),get(Property)
-
unset
void unset(Property property)
Unsets the property of the object.If the property is
many-valued, the value must be anListand that list is cleared. Otherwise, the value of the property of the object is set to the property'sdefault value. The property will no longer be consideredset.- Parameters:
property- the property in question.- See Also:
isSet(Property),set(Property, Object),get(Property)
-
getBoolean
boolean getBoolean(Property property)
Returns the value of the specifiedbooleanproperty.- Parameters:
property- the property to get.- Returns:
- the
booleanvalue of the specified property. - See Also:
get(Property)
-
getByte
byte getByte(Property property)
Returns the value of the specifiedbyteproperty.- Parameters:
property- the property to get.- Returns:
- the
bytevalue of the specified property. - See Also:
get(Property)
-
getChar
char getChar(Property property)
Returns the value of the specifiedcharproperty.- Parameters:
property- the property to get.- Returns:
- the
charvalue of the specified property. - See Also:
get(Property)
-
getDouble
double getDouble(Property property)
Returns the value of the specifieddoubleproperty.- Parameters:
property- the property to get.- Returns:
- the
doublevalue of the specified property. - See Also:
get(Property)
-
getFloat
float getFloat(Property property)
Returns the value of the specifiedfloatproperty.- Parameters:
property- the property to get.- Returns:
- the
floatvalue of the specified property. - See Also:
get(Property)
-
getInt
int getInt(Property property)
Returns the value of the specifiedintproperty.- Parameters:
property- the property to get.- Returns:
- the
intvalue of the specified property. - See Also:
get(Property)
-
getLong
long getLong(Property property)
Returns the value of the specifiedlongproperty.- Parameters:
property- the property to get.- Returns:
- the
longvalue of the specified property. - See Also:
get(Property)
-
getShort
short getShort(Property property)
Returns the value of the specifiedshortproperty.- Parameters:
property- the property to get.- Returns:
- the
shortvalue of the specified property. - See Also:
get(Property)
-
getBytes
byte[] getBytes(Property property)
Returns the value of the specifiedbyte[]property.- Parameters:
property- the property to get.- Returns:
- the
byte[]value of the specified property. - See Also:
get(Property)
-
getBigDecimal
BigDecimal getBigDecimal(Property property)
Returns the value of the specifiedBigDecimalproperty.- Parameters:
property- the property to get.- Returns:
- the
BigDecimalvalue of the specified property. - See Also:
get(Property)
-
getBigInteger
BigInteger getBigInteger(Property property)
Returns the value of the specifiedBigIntegerproperty.- Parameters:
property- the property to get.- Returns:
- the
BigIntegervalue of the specified property. - See Also:
get(Property)
-
getDataObject
DataObject getDataObject(Property property)
Returns the value of the specifiedDataObjectproperty.- Parameters:
property- the property to get.- Returns:
- the
DataObjectvalue of the specified property. - See Also:
get(Property)
-
getDate
Date getDate(Property property)
Returns the value of the specifiedDateproperty.- Parameters:
property- the property to get.- Returns:
- the
Datevalue of the specified property. - See Also:
get(Property)
-
getString
String getString(Property property)
Returns the value of the specifiedStringproperty.- Parameters:
property- the property to get.- Returns:
- the
Stringvalue of the specified property. - See Also:
get(Property)
-
getList
List getList(Property property)
Returns the value of the specifiedListproperty. 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.- Parameters:
property- the property to get.- Returns:
- the
Listvalue of the specified property. - See Also:
get(Property)
-
getSequence
Sequence getSequence(Property property)
Deprecated.in 2.1.0.- Parameters:
property- the property to get.- Returns:
- the
Sequencevalue of the specified property. - See Also:
Returns the value of the specified Sequence property. An implementation may throw an UnsupportedOperationException.,get(Property)
-
setBoolean
void setBoolean(Property property, boolean value)
Sets the value of the specifiedbooleanproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setByte
void setByte(Property property, byte value)
Sets the value of the specifiedbyteproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setChar
void setChar(Property property, char value)
Sets the value of the specifiedcharproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setDouble
void setDouble(Property property, double value)
Sets the value of the specifieddoubleproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setFloat
void setFloat(Property property, float value)
Sets the value of the specifiedfloatproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setInt
void setInt(Property property, int value)
Sets the value of the specifiedintproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setLong
void setLong(Property property, long value)
Sets the value of the specifiedlongproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setShort
void setShort(Property property, short value)
Sets the value of the specifiedshortproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setBytes
void setBytes(Property property, byte[] value)
Sets the value of the specifiedbyte[]property, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setBigDecimal
void setBigDecimal(Property property, BigDecimal value)
Sets the value of the specifiedBigDecimalproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setBigInteger
void setBigInteger(Property property, BigInteger value)
Sets the value of the specifiedBigIntegerproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setDataObject
void setDataObject(Property property, DataObject value)
Sets the value of the specifiedDataObjectproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setDate
void setDate(Property property, Date value)
Sets the value of the specifiedDateproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setString
void setString(Property property, String value)
Sets the value of the specifiedStringproperty, to the specified value.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
setList
void setList(Property property, List value)
Sets the value of the specifiedListproperty, to the specified value.The new value must be a
Listand each object in that list must bean instance ofthe property'stype; the existing contents are cleared and the contents of the new value are added.- Parameters:
property- the property to set.value- the new value for the property.- See Also:
set(Property, Object)
-
createDataObject
DataObject createDataObject(String propertyName)
Returns a newdata objectcontained by this object using the specified property, which must be acontainment property. The type of the created object is thedeclared typeof the specified property.- Parameters:
propertyName- the name of the specified containment property.- Returns:
- the created data object.
- See Also:
createDataObject(String, String, String)
-
createDataObject
DataObject createDataObject(int propertyIndex)
Returns a newdata objectcontained by this object using the specified property, which must be acontainment property. The type of the created object is thedeclared typeof the specified property.- Parameters:
propertyIndex- the index of the specified containment property.- Returns:
- the created data object.
- See Also:
createDataObject(int, String, String)
-
createDataObject
DataObject createDataObject(Property property)
Returns a newdata objectcontained by this object using the specified property, which must be acontainment property. The type of the created object is thedeclared typeof the specified property.- Parameters:
property- the specified containment property.- Returns:
- the created data object.
- See Also:
createDataObject(Property, Type)
-
createDataObject
DataObject createDataObject(String propertyName, String namespaceURI, String typeName)
Returns a newdata objectcontained by this object using the specified property, which must be acontainment 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.- 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),TypeHelper.getType(java.lang.String, java.lang.String)
-
createDataObject
DataObject createDataObject(int propertyIndex, String namespaceURI, String typeName)
Returns a newdata objectcontained by this object using the specified property, which must be acontainment 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.- 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),TypeHelper.getType(java.lang.String, java.lang.String)
-
createDataObject
DataObject createDataObject(Property property, Type type)
Returns a newdata objectcontained by this object using the specified property, which must be ofcontainment type. The type of the created object is specified by the type argument, which must be a compatible target for the speicifed property.- 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)
-
delete
void delete()
Remove this object from its container and then unset all its non-readOnlyProperties. If this object is contained by areadOnlycontainment property, its non-readOnlyProperties will be unset but the object will not be removed from its container. All DataObjects recursively contained bycontainment Propertieswill also be deleted.
-
getContainer
DataObject getContainer()
Returns the containingdata objectornullif there is no container.- Returns:
- the containing data object or
null.
-
getContainmentProperty
Property getContainmentProperty()
Return the Property of thedata objectcontaining this data object ornullif there is no container.- Returns:
- the property containing this data object.
-
getDataGraph
DataGraph getDataGraph()
Deprecated.Returns thedata graphfor this object ornullif there isn't one.- Returns:
- the containing data graph or
null.
-
getType
Type getType()
Returns the data object's type.The type defines the Properties available for reflective access.
- Returns:
- the type.
-
getSequence
Sequence getSequence()
Returns theSequencefor 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.- Returns:
- the
Sequenceor null.
-
getInstanceProperties
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.- Returns:
- the List of Properties currently used in this DataObject.
-
getInstanceProperty
Property getInstanceProperty(String propertyName)
Returns the named Property from the current instance properties, or null if not found. The instance properties are getInstanceProperties().- Parameters:
propertyName- the name of the Property- Returns:
- the named Property from the DataObject's current instance properties, or null.
-
getProperty
Property getProperty(String propertyName)
Deprecated.replaced bygetInstanceProperty(String)in 2.1.0
-
getRootObject
DataObject getRootObject()
Returns the rootdata object.- Returns:
- the root data object.
-
getChangeSummary
ChangeSummary getChangeSummary()
Returns the ChangeSummary with scope covering this dataObject, or null if there is no ChangeSummary.- Returns:
- the ChangeSummary with scope covering this dataObject, or null.
-
detach
void detach()
Removes this DataObject from its container, if any. Same as getContainer().getList(getContainmentProperty()).remove(this) or getContainer().unset(getContainmentProperty()) depending on getContainmentProperty().isMany() respectively.
-
-