|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.agfa.hap.sdo.implementation.AbstractDataObject com.agfa.hap.sdo.implementation.AbstractPartialDataObject
public abstract class AbstractPartialDataObject
Field Summary | |
---|---|
protected boolean |
isSettingProperty
|
Fields inherited from class com.agfa.hap.sdo.implementation.AbstractDataObject |
---|
logger, type |
Fields inherited from interface com.agfa.hap.sdo.PartialDataObject |
---|
UNAVAILABLE_PROPERTY |
Constructor Summary | |
---|---|
protected |
AbstractPartialDataObject(Type type)
|
protected |
AbstractPartialDataObject(Type type,
DataGraph dataGraph)
|
Method Summary | |
---|---|
protected abstract java.lang.Object |
basicGet(Property property)
Returns the value of the property. |
protected abstract void |
basicSet(Property property,
java.lang.Object value)
|
PartialDataObject |
createDataObject(int propertyIndex)
Returns a new data object contained by this object using the specified property,
which must be a containment property . |
PartialDataObject |
createDataObject(int propertyIndex,
java.lang.String namespaceURI,
java.lang.String typeName)
Returns a new data object contained by this object using the specified property,
which must be a containment property . |
PartialDataObject |
createDataObject(Property property)
Returns a new data object contained by this object using the specified property,
which must be a containment property . |
PartialDataObject |
createDataObject(Property property,
Type type)
Returns a new data object contained by this object using the specified property,
which must be of containment type . |
PartialDataObject |
createDataObject(java.lang.String propertyName)
Returns a new data object contained by this object using the specified property,
which must be a containment property . |
PartialDataObject |
createDataObject(java.lang.String propertyName,
java.lang.String namespaceURI,
java.lang.String typeName)
Returns a new data object contained by this object using the specified property,
which must be a containment property . |
java.lang.Object |
get(Property property)
Returns the value of the given property of this object. |
PartialDataObject |
getContainer()
Returns the containing data object
or null if there is no container. |
Property |
getContainmentProperty()
Return the Property of the data object containing this data object
or null if there is no container. |
PartialDataObject |
getDataObject(int propertyIndex)
Returns the value of a DataObject property identified by the specified property index. |
PartialDataObject |
getDataObject(Property property)
Returns the value of the specified DataObject property. |
PartialDataObject |
getDataObject(java.lang.String path)
Returns the value of a DataObject property identified by the specified path. |
java.lang.Object |
getIdentity()
|
protected abstract java.util.List |
initializeWithEmptyList(Property property)
|
boolean |
isAvailable(Property property)
|
boolean |
isProxy()
|
boolean |
isSet(Property property)
Returns whether the property of the object is considered to be set. |
protected java.util.List<java.lang.Object> |
safeGetList(Property property)
|
void |
set(Property property,
java.lang.Object value)
Sets the value of the given property of the object to the new value. |
void |
setIdentity(java.lang.Object value)
Sets the value of the identity property for this
instance. |
void |
setList(Property property,
java.util.List value)
Sets the value of the specified List property, to the specified value. |
void |
setUnavailable(Property property)
Strips the property such that is no longer available. |
void |
unset(Property property)
Unsets the property of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.agfa.hap.sdo.PartialDataObject |
---|
getType |
Field Detail |
---|
protected boolean isSettingProperty
Constructor Detail |
---|
protected AbstractPartialDataObject(Type type)
protected AbstractPartialDataObject(Type type, DataGraph dataGraph)
Method Detail |
---|
protected abstract java.lang.Object basicGet(Property property)
PartialDataObject.UNAVAILABLE_PROPERTY
.
protected abstract void basicSet(Property property, java.lang.Object value)
public java.lang.Object get(Property property)
DataObject
If the property is many-valued
,
the result will be a List
and each object in the List will be an instance of
the property's type
.
Otherwise the result will directly be an instance of the property's type.
get
in interface DataObject
property
- the property of the value to fetch.
DataObject.set(Property, Object)
,
DataObject.unset(Property)
,
DataObject.isSet(Property)
public void set(Property property, java.lang.Object value)
DataObject
If the property is many-valued
,
the new value must be a List
and each object in that list must be an instance of
the property's type
;
the existing contents are cleared and the contents of the new value are added.
Otherwise the new value directly must be an instance of the property's type
and it becomes the new value of the property of the object.
set
in interface DataObject
property
- the property of the value to set.value
- the new value for the property.DataObject.unset(Property)
,
DataObject.isSet(Property)
,
DataObject.get(Property)
public PartialDataObject createDataObject(java.lang.String propertyName)
DataObject
data object
contained by this object using the specified property,
which must be a containment property
.
The type of the created object is the declared type
of the specified property.
createDataObject
in interface PartialDataObject
createDataObject
in interface DataObject
propertyName
- the name of the specified containment property.
DataObject.createDataObject(String, String, String)
public PartialDataObject createDataObject(int propertyIndex)
DataObject
data object
contained by this object using the specified property,
which must be a containment property
.
The type of the created object is the declared type
of the specified property.
createDataObject
in interface PartialDataObject
createDataObject
in interface DataObject
propertyIndex
- the index of the specified containment property.
DataObject.createDataObject(int, String, String)
public PartialDataObject createDataObject(Property property)
DataObject
data object
contained by this object using the specified property,
which must be a containment property
.
The type of the created object is the declared type
of the specified property.
createDataObject
in interface PartialDataObject
createDataObject
in interface DataObject
property
- the specified containment property.
DataObject.createDataObject(Property, Type)
public PartialDataObject createDataObject(java.lang.String propertyName, java.lang.String namespaceURI, java.lang.String typeName)
DataObject
data object
contained by this object using the specified property,
which must be a containment property
.
The type of the created object is specified by the packageURI and typeName arguments.
The specified type must be a compatible target for the property identified by propertyName.
createDataObject
in interface PartialDataObject
createDataObject
in interface DataObject
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.
DataObject.createDataObject(String)
,
DataGraph.getType(java.lang.String, java.lang.String)
public PartialDataObject createDataObject(int propertyIndex, java.lang.String namespaceURI, java.lang.String typeName)
DataObject
data object
contained by this object using the specified property,
which must be a containment property
.
The type of the created object is specified by the packageURI and typeName arguments.
The specified type must be a compatible target for the property identified by propertyIndex.
createDataObject
in interface PartialDataObject
createDataObject
in interface DataObject
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.
DataObject.createDataObject(int)
,
DataGraph.getType(java.lang.String, java.lang.String)
public PartialDataObject createDataObject(Property property, Type type)
DataObject
data object
contained by this object using the specified property,
which must be of containment type
.
The type of the created object is specified by the type argument,
which must be a compatible target for the speicifed property.
createDataObject
in interface PartialDataObject
createDataObject
in interface DataObject
property
- a containment property of this object.type
- the type of object to be created.
DataObject.createDataObject(int)
protected java.util.List<java.lang.Object> safeGetList(Property property)
protected abstract java.util.List initializeWithEmptyList(Property property)
public void setList(Property property, java.util.List value)
DataObject
List
property, to the specified value.
The new value must be a List
and each object in that list must be an instance of
the property's type
;
the existing contents are cleared and the contents of the new value are added.
setList
in interface DataObject
setList
in class AbstractDataObject
property
- the property to set.value
- the new value for the property.DataObject.set(Property, Object)
public PartialDataObject getDataObject(int propertyIndex)
DataObject
DataObject
property identified by the specified property index.
getDataObject
in interface PartialDataObject
getDataObject
in interface DataObject
propertyIndex
- the index of the property.
DataObject
value of the specified property.DataObject.get(int)
public PartialDataObject getDataObject(Property property)
DataObject
DataObject
property.
getDataObject
in interface PartialDataObject
getDataObject
in interface DataObject
property
- the property to get.
DataObject
value of the specified property.DataObject.get(Property)
public PartialDataObject getDataObject(java.lang.String path)
DataObject
DataObject
property identified by the specified path.
getDataObject
in interface PartialDataObject
getDataObject
in interface DataObject
path
- the path to a valid object and property.
DataObject
value of the specified property.DataObject.get(String)
public Property getContainmentProperty()
DataObject
data object
containing this data object
or null
if there is no container.
getContainmentProperty
in interface PartialDataObject
getContainmentProperty
in interface DataObject
getContainmentProperty
in class AbstractDataObject
public PartialDataObject getContainer()
DataObject
data object
or null
if there is no container.
getContainer
in interface PartialDataObject
getContainer
in interface DataObject
getContainer
in class AbstractDataObject
null
.public java.lang.Object getIdentity()
getIdentity
in interface PartialDataObject
identity property
for this
instance.public void setIdentity(java.lang.Object value)
PartialDataObject
identity property
for this
instance.
setIdentity
in interface PartialDataObject
public boolean isAvailable(Property property)
isAvailable
in interface PartialDataObject
public void setUnavailable(Property property)
PartialDataObject
setUnavailable
in interface PartialDataObject
public boolean isSet(Property property)
DataObject
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.
isSet
in interface DataObject
property
- the property in question.
DataObject.set(Property, Object)
,
DataObject.unset(Property)
,
DataObject.get(Property)
public void unset(Property property)
DataObject
If the property is many-valued
,
the value must be an List
and that list is cleared.
Otherwise,
the value of the property of the object
is set to the property's default value
.
The property will no longer be considered set
.
unset
in interface DataObject
property
- the property in question.DataObject.isSet(Property)
,
DataObject.set(Property, Object)
,
DataObject.get(Property)
public boolean isProxy()
isProxy
in interface PartialDataObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |