- All Superinterfaces:
Serializable
- All Known Implementing Classes:
OpenSequencedTypeImpl
,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
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.
-
Method Summary
Modifier and TypeMethodDescriptioncreateDataObject
(int propertyIndex) Returns a newdata object
contained by this object using the specified property, which must be acontainment property
.createDataObject
(int propertyIndex, String namespaceURI, String typeName) Returns a newdata object
contained by this object using the specified property, which must be acontainment property
.createDataObject
(Property property) Returns a newdata object
contained by this object using the specified property, which must be acontainment property
.createDataObject
(Property property, Type type) Returns a newdata object
contained by this object using the specified property, which must be ofcontainment type
.createDataObject
(String propertyName) Returns a newdata object
contained by this object using the specified property, which must be acontainment property
.createDataObject
(String propertyName, String namespaceURI, String typeName) Returns a newdata object
contained by this object using the specified property, which must be acontainment property
.void
delete()
Remove this object from its container and then unset all its non-readOnly
Properties.void
detach()
Removes this DataObject from its container, if any.get
(int propertyIndex) Returns the value of the property at the specified index inproperty list
of this object'stype
.Returns the value of the given property of this object.Returns the value of a property of either this object or an object reachable from it, as identified by the specified path.getBigDecimal
(int propertyIndex) Returns the value of aBigDecimal
property identified by the specified property index.getBigDecimal
(Property property) Returns the value of the specifiedBigDecimal
property.getBigDecimal
(String path) Returns the value of aBigDecimal
property identified by the specified path.getBigInteger
(int propertyIndex) Returns the value of aBigInteger
property identified by the specified property index.getBigInteger
(Property property) Returns the value of the specifiedBigInteger
property.getBigInteger
(String path) Returns the value of aBigInteger
property identified by the specified path.boolean
getBoolean
(int propertyIndex) Returns the value of aboolean
property identified by the specified property index.boolean
getBoolean
(Property property) Returns the value of the specifiedboolean
property.boolean
getBoolean
(String path) Returns the value of aboolean
property identified by the specified path.byte
getByte
(int propertyIndex) Returns the value of abyte
property identified by the specified property index.byte
Returns the value of the specifiedbyte
property.byte
Returns the value of abyte
property identified by the specified path.byte[]
getBytes
(int propertyIndex) Returns the value of abyte[]
property identified by the specified property index.byte[]
Returns the value of the specifiedbyte[]
property.byte[]
Returns the value of abyte[]
property identified by the specified path.Returns the ChangeSummary with scope covering this dataObject, or null if there is no ChangeSummary.char
getChar
(int propertyIndex) Returns the value of achar
property identified by the specified property index.char
Returns the value of the specifiedchar
property.char
Returns the value of achar
property identified by the specified path.Returns the containingdata object
ornull
if there is no container.Return the Property of thedata object
containing this data object ornull
if there is no container.Deprecated.getDataObject
(int propertyIndex) Returns the value of aDataObject
property identified by the specified property index.getDataObject
(Property property) Returns the value of the specifiedDataObject
property.getDataObject
(String path) Returns the value of aDataObject
property identified by the specified path.getDate
(int propertyIndex) Returns the value of aDate
property identified by the specified property index.Returns the value of the specifiedDate
property.Returns the value of aDate
property identified by the specified path.double
getDouble
(int propertyIndex) Returns the value of adouble
property identified by the specified property index.double
Returns the value of the specifieddouble
property.double
Returns the value of adouble
property identified by the specified path.float
getFloat
(int propertyIndex) Returns the value of afloat
property identified by the specified property index.float
Returns the value of the specifiedfloat
property.float
Returns the value of afloat
property identified by the specified path.Returns a read-only List of the Properties currently used in this DataObject.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 aint
property identified by the specified property index.int
Returns the value of the specifiedint
property.int
Returns the value of aint
property identified by the specified path.getList
(int propertyIndex) Returns the value of aList
property identified by the specified property index.Returns the value of the specifiedList
property.Returns the value of aList
property identified by the specified path.long
getLong
(int propertyIndex) Returns the value of along
property identified by the specified property index.long
Returns the value of the specifiedlong
property.long
Returns the value of along
property identified by the specified path.getProperty
(String propertyName) Deprecated.Returns the rootdata object
.Returns theSequence
for this DataObject.getSequence
(int propertyIndex) Deprecated.in 2.1.0.getSequence
(Property property) Deprecated.in 2.1.0.getSequence
(String path) Deprecated.in 2.1.0.short
getShort
(int propertyIndex) Returns the value of ashort
property identified by the specified property index.short
Returns the value of the specifiedshort
property.short
Returns the value of ashort
property identified by the specified path.getString
(int propertyIndex) Returns the value of aString
property identified by the specified property index.Returns the value of the specifiedString
property.Returns the value of aString
property identified by the specified path.getType()
Returns the data object's type.boolean
isSet
(int propertyIndex) Returns whether the the property at the specified index inproperty list
of this object'stype
, is considered to be set.boolean
Returns whether the property of the object is considered to be set.boolean
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
Sets the property at the specified index inproperty list
of this object'stype
, to the specified value.void
Sets the value of the given property of the object to the new value.void
Sets a property of either this object or an object reachable from it, as identified by the specified path, to the specified value.void
setBigDecimal
(int propertyIndex, BigDecimal value) Sets the value of aBigDecimal
property identified by the specified property index, to the specified value.void
setBigDecimal
(Property property, BigDecimal value) Sets the value of the specifiedBigDecimal
property, to the specified value.void
setBigDecimal
(String path, BigDecimal value) Sets the value of aBigDecimal
property identified by the specified path, to the specified value.void
setBigInteger
(int propertyIndex, BigInteger value) Sets the value of aBigInteger
property identified by the specified property index, to the specified value.void
setBigInteger
(Property property, BigInteger value) Sets the value of the specifiedBigInteger
property, to the specified value.void
setBigInteger
(String path, BigInteger value) Sets the value of aBigInteger
property identified by the specified path, to the specified value.void
setBoolean
(int propertyIndex, boolean value) Sets the value of aboolean
property identified by the specified property index, to the specified value.void
setBoolean
(Property property, boolean value) Sets the value of the specifiedboolean
property, to the specified value.void
setBoolean
(String path, boolean value) Sets the value of aboolean
property identified by the specified path, to the specified value.void
setByte
(int propertyIndex, byte value) Sets the value of abyte
property identified by the specified property index, to the specified value.void
Sets the value of the specifiedbyte
property, to the specified value.void
Sets the value of abyte
property identified by the specified path, to the specified value.void
setBytes
(int propertyIndex, byte[] value) Sets the value of abyte[]
property identified by the specified property index, to the specified value.void
Sets the value of the specifiedbyte[]
property, to the specified value.void
Sets the value of abyte[]
property identified by the specified path, to the specified value.void
setChar
(int propertyIndex, char value) Sets the value of achar
property identified by the specified property index, to the specified value.void
Sets the value of the specifiedchar
property, to the specified value.void
Sets the value of achar
property identified by the specified path, to the specified value.void
setDataObject
(int propertyIndex, DataObject value) Sets the value of aDataObject
property identified by the specified property index, to the specified value.void
setDataObject
(Property property, DataObject value) Sets the value of the specifiedDataObject
property, to the specified value.void
setDataObject
(String path, DataObject value) Sets the value of aDataObject
property identified by the specified path, to the specified value.void
Sets the value of aDate
property identified by the specified property index, to the specified value.void
Sets the value of the specifiedDate
property, to the specified value.void
Sets the value of aDate
property identified by the specified path, to the specified value.void
setDouble
(int propertyIndex, double value) Sets the value of adouble
property identified by the specified property index, to the specified value.void
Sets the value of the specifieddouble
property, to the specified value.void
Sets the value of adouble
property identified by the specified path, to the specified value.void
setFloat
(int propertyIndex, float value) Sets the value of afloat
property identified by the specified property index, to the specified value.void
Sets the value of the specifiedfloat
property, to the specified value.void
Sets the value of afloat
property identified by the specified path, to the specified value.void
setInt
(int propertyIndex, int value) Sets the value of aint
property identified by the specified property index, to the specified value.void
Sets the value of the specifiedint
property, to the specified value.void
Sets the value of aint
property identified by the specified path, to the specified value.void
Sets the value of aList
property identified by the specified property index, to the specified value.void
Sets the value of the specifiedList
property, to the specified value.void
Sets the value of aList
property identified by the specified path, to the specified value.void
setLong
(int propertyIndex, long value) Sets the value of along
property identified by the specified property index, to the specified value.void
Sets the value of the specifiedlong
property, to the specified value.void
Sets the value of along
property identified by the specified path, to the specified value.void
setShort
(int propertyIndex, short value) Sets the value of ashort
property identified by the specified property index, to the specified value.void
Sets the value of the specifiedshort
property, to the specified value.void
Sets the value of ashort
property identified by the specified path, to the specified value.void
Sets the value of aString
property identified by the specified property index, to the specified value.void
Sets the value of the specifiedString
property, to the specified value.void
Sets the value of aString
property identified by the specified path, to the specified value.void
unset
(int propertyIndex) Unsets the property at the specified index inproperty list
of this object'stype
.void
Unsets the property of the object.void
Unsets a property of either this object or an object reachable from it, as identified by the specified path.
-
Method Details
-
get
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:
-
set
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:
-
isSet
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:
-
unset
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:
-
getBoolean
Returns the value of aboolean
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
boolean
value of the specified property. - See Also:
-
getByte
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:
-
getChar
Returns the value of achar
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
char
value of the specified property. - See Also:
-
getDouble
Returns the value of adouble
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
double
value of the specified property. - See Also:
-
getFloat
Returns the value of afloat
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
float
value of the specified property. - See Also:
-
getInt
Returns the value of aint
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
int
value of the specified property. - See Also:
-
getLong
Returns the value of along
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
long
value of the specified property. - See Also:
-
getShort
Returns the value of ashort
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
short
value of the specified property. - See Also:
-
getBytes
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:
-
getBigDecimal
Returns the value of aBigDecimal
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
BigDecimal
value of the specified property. - See Also:
-
getBigInteger
Returns the value of aBigInteger
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
BigInteger
value of the specified property. - See Also:
-
getDataObject
Returns the value of aDataObject
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
DataObject
value of the specified property. - See Also:
-
getDate
Returns the value of aDate
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
Date
value of the specified property. - See Also:
-
getString
Returns the value of aString
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
String
value of the specified property. - See Also:
-
getList
Returns the value of aList
property identified by the specified path.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
List
value of the specified property. - See Also:
-
getSequence
Deprecated.in 2.1.0.- Parameters:
path
- the path to a valid object and property.- Returns:
- the
Sequence
value of the specified property. - See Also:
-
setBoolean
Sets the value of aboolean
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:
-
setByte
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:
-
setChar
Sets the value of achar
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:
-
setDouble
Sets the value of adouble
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:
-
setFloat
Sets the value of afloat
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:
-
setInt
Sets the value of aint
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:
-
setLong
Sets the value of along
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:
-
setShort
Sets the value of ashort
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:
-
setBytes
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:
-
setBigDecimal
Sets the value of aBigDecimal
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:
-
setBigInteger
Sets the value of aBigInteger
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:
-
setDataObject
Sets the value of aDataObject
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:
-
setDate
Sets the value of aDate
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:
-
setString
Sets the value of aString
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:
-
setList
Sets the value of aList
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:
-
get
Returns the value of the property at the specified index inproperty list
of this object'stype
.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the value of the specified property.
- See Also:
-
set
Sets the property at the specified index inproperty list
of this object'stype
, to the specified value.- Parameters:
propertyIndex
- the index of the property.value
- the new value for the property.- See Also:
-
isSet
boolean isSet(int propertyIndex) Returns whether the the property at the specified index inproperty list
of this object'stype
, is considered to be set.- Parameters:
propertyIndex
- the index of the property.- Returns:
- whether the specified property is set.
- See Also:
-
unset
void unset(int propertyIndex) Unsets the property at the specified index inproperty list
of this object'stype
.- Parameters:
propertyIndex
- the index of the property.- See Also:
-
getBoolean
boolean getBoolean(int propertyIndex) Returns the value of aboolean
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
boolean
value of the specified property. - See Also:
-
getByte
byte getByte(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:
-
getChar
char getChar(int propertyIndex) Returns the value of achar
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
char
value of the specified property. - See Also:
-
getDouble
double getDouble(int propertyIndex) Returns the value of adouble
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
double
value of the specified property. - See Also:
-
getFloat
float getFloat(int propertyIndex) Returns the value of afloat
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
float
value of the specified property. - See Also:
-
getInt
int getInt(int propertyIndex) Returns the value of aint
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
int
value of the specified property. - See Also:
-
getLong
long getLong(int propertyIndex) Returns the value of along
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
long
value of the specified property. - See Also:
-
getShort
short getShort(int propertyIndex) Returns the value of ashort
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
short
value of the specified property. - See Also:
-
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:
-
getBigDecimal
Returns the value of aBigDecimal
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
BigDecimal
value of the specified property. - See Also:
-
getBigInteger
Returns the value of aBigInteger
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
BigInteger
value of the specified property. - See Also:
-
getDataObject
Returns the value of aDataObject
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
DataObject
value of the specified property. - See Also:
-
getDate
Returns the value of aDate
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
Date
value of the specified property. - See Also:
-
getString
Returns the value of aString
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
String
value of the specified property. - See Also:
-
getList
Returns the value of aList
property identified by the specified property index.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
List
value of the specified property. - See Also:
-
getSequence
Deprecated.in 2.1.0.- Parameters:
propertyIndex
- the index of the property.- Returns:
- the
Sequence
value of the specified property. - See Also:
-
setBoolean
void setBoolean(int propertyIndex, boolean value) Sets the value of aboolean
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:
-
setByte
void setByte(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:
-
setChar
void setChar(int propertyIndex, char value) Sets the value of achar
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:
-
setDouble
void setDouble(int propertyIndex, double value) Sets the value of adouble
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:
-
setFloat
void setFloat(int propertyIndex, float value) Sets the value of afloat
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:
-
setInt
void setInt(int propertyIndex, int value) Sets the value of aint
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:
-
setLong
void setLong(int propertyIndex, long value) Sets the value of along
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:
-
setShort
void setShort(int propertyIndex, short value) Sets the value of ashort
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:
-
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:
-
setBigDecimal
Sets the value of aBigDecimal
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:
-
setBigInteger
Sets the value of aBigInteger
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:
-
setDataObject
Sets the value of aDataObject
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:
-
setDate
Sets the value of aDate
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:
-
setString
Sets the value of aString
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:
-
setList
Sets the value of aList
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:
-
get
Returns the value of the given property of this object.If the property is
many-valued
, the result will be aList
and each object in the List will bean instance of
the 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
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 aList
and each object in that list must bean instance of
the 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:
-
isSet
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:
-
unset
Unsets the property of the object.If the property is
many-valued
, the value must be anList
and 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:
-
getBoolean
Returns the value of the specifiedboolean
property.- Parameters:
property
- the property to get.- Returns:
- the
boolean
value of the specified property. - See Also:
-
getByte
Returns the value of the specifiedbyte
property.- Parameters:
property
- the property to get.- Returns:
- the
byte
value of the specified property. - See Also:
-
getChar
Returns the value of the specifiedchar
property.- Parameters:
property
- the property to get.- Returns:
- the
char
value of the specified property. - See Also:
-
getDouble
Returns the value of the specifieddouble
property.- Parameters:
property
- the property to get.- Returns:
- the
double
value of the specified property. - See Also:
-
getFloat
Returns the value of the specifiedfloat
property.- Parameters:
property
- the property to get.- Returns:
- the
float
value of the specified property. - See Also:
-
getInt
Returns the value of the specifiedint
property.- Parameters:
property
- the property to get.- Returns:
- the
int
value of the specified property. - See Also:
-
getLong
Returns the value of the specifiedlong
property.- Parameters:
property
- the property to get.- Returns:
- the
long
value of the specified property. - See Also:
-
getShort
Returns the value of the specifiedshort
property.- Parameters:
property
- the property to get.- Returns:
- the
short
value of the specified property. - See Also:
-
getBytes
Returns the value of the specifiedbyte[]
property.- Parameters:
property
- the property to get.- Returns:
- the
byte[]
value of the specified property. - See Also:
-
getBigDecimal
Returns the value of the specifiedBigDecimal
property.- Parameters:
property
- the property to get.- Returns:
- the
BigDecimal
value of the specified property. - See Also:
-
getBigInteger
Returns the value of the specifiedBigInteger
property.- Parameters:
property
- the property to get.- Returns:
- the
BigInteger
value of the specified property. - See Also:
-
getDataObject
Returns the value of the specifiedDataObject
property.- Parameters:
property
- the property to get.- Returns:
- the
DataObject
value of the specified property. - See Also:
-
getDate
Returns the value of the specifiedDate
property.- Parameters:
property
- the property to get.- Returns:
- the
Date
value of the specified property. - See Also:
-
getString
Returns the value of the specifiedString
property.- Parameters:
property
- the property to get.- Returns:
- the
String
value of the specified property. - See Also:
-
getList
Returns the value of the specifiedList
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.- Parameters:
property
- the property to get.- Returns:
- the
List
value of the specified property. - See Also:
-
getSequence
Deprecated.in 2.1.0.- Parameters:
property
- the property to get.- Returns:
- the
Sequence
value of the specified property. - See Also:
-
setBoolean
Sets the value of the specifiedboolean
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setByte
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:
-
setChar
Sets the value of the specifiedchar
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setDouble
Sets the value of the specifieddouble
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setFloat
Sets the value of the specifiedfloat
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setInt
Sets the value of the specifiedint
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setLong
Sets the value of the specifiedlong
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setShort
Sets the value of the specifiedshort
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setBytes
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:
-
setBigDecimal
Sets the value of the specifiedBigDecimal
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setBigInteger
Sets the value of the specifiedBigInteger
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setDataObject
Sets the value of the specifiedDataObject
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setDate
Sets the value of the specifiedDate
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setString
Sets the value of the specifiedString
property, to the specified value.- Parameters:
property
- the property to set.value
- the new value for the property.- See Also:
-
setList
Sets the value of the specifiedList
property, to the specified value.The new value must be a
List
and each object in that list must bean instance of
the 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:
-
createDataObject
Returns a newdata object
contained by this object using the specified property, which must be acontainment property
. The type of the created object is thedeclared type
of the specified property.- Parameters:
propertyName
- the name of the specified containment property.- Returns:
- the created data object.
- See Also:
-
createDataObject
Returns a newdata object
contained by this object using the specified property, which must be acontainment property
. The type of the created object is thedeclared type
of the specified property.- Parameters:
propertyIndex
- the index of the specified containment property.- Returns:
- the created data object.
- See Also:
-
createDataObject
Returns a newdata object
contained by this object using the specified property, which must be acontainment property
. The type of the created object is thedeclared type
of the specified property.- Parameters:
property
- the specified containment property.- Returns:
- the created data object.
- See Also:
-
createDataObject
Returns a newdata object
contained 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
Returns a newdata object
contained 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
Returns a newdata object
contained 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:
-
delete
void delete()Remove this object from its container and then unset all its non-readOnly
Properties. If this object is contained by areadOnly
containment property
, its non-readOnly
Properties will be unset but the object will not be removed from its container. All DataObjects recursively contained bycontainment Properties
will also be deleted. -
getContainer
DataObject getContainer()Returns the containingdata object
ornull
if there is no container.- Returns:
- the containing data object or
null
.
-
getContainmentProperty
Property getContainmentProperty()Return the Property of thedata object
containing this data object ornull
if there is no container.- Returns:
- the property containing this data object.
-
getDataGraph
DataGraph getDataGraph()Deprecated.Returns thedata graph
for this object ornull
if 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 theSequence
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.- Returns:
- the
Sequence
or 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
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
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.
-
getInstanceProperty(String)
in 2.1.0