com.agfa.hap.sdo
Interface PartialDataObject

All Superinterfaces:
DataObject, java.io.Serializable
All Known Implementing Classes:
AbstractPartialDataObject, DataObjectImplementation

public interface PartialDataObject
extends DataObject

HAP-specific extension to DataObject. A DataObject of which only a subset of its properties are available. Getting or setting a property which is not available results in an PropertyNotAvailableException being thrown.
A PartialDataObject that only has its identity property available is called a proxy.
PartialDataObjects are typically used (1) to allow dataobjects to have only a subset of their many-valued properties available and (2) to enable data object proxies.
Properties that are not available are also not set (i.e. DataObject.isSet(int) return false).

Author:
AMOCZ
See Also:
Snapshot

Field Summary
static java.lang.Object UNAVAILABLE_PROPERTY
          Marker value for unavailable properties
 
Method Summary
 PartialDataObject createDataObject(int index)
          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 name)
          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.
 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 index)
          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 name)
          Returns the value of a DataObject property identified by the specified path.
 java.lang.Object getIdentity()
           
 Type getType()
          Returns the data object's type.
 boolean isAvailable(Property property)
           
 boolean isProxy()
           
 void setIdentity(java.lang.Object object)
          Sets the value of the identity property for this instance.
 void setUnavailable(Property property)
          Strips the property such that is no longer available.
 
Methods inherited from interface commonj.sdo.DataObject
delete, detach, get, get, get, getBigDecimal, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getBytes, getBytes, getBytes, getChangeSummary, getChar, getChar, getChar, getDataGraph, getDate, getDate, getDate, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInstanceProperties, getInstanceProperty, getInt, getInt, getInt, getList, getList, getList, getLong, getLong, getLong, getProperty, getRootObject, getSequence, getSequence, getSequence, getSequence, getShort, getShort, getShort, getString, getString, getString, isSet, isSet, isSet, set, set, set, setBigDecimal, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBigInteger, setBoolean, setBoolean, setBoolean, setByte, setByte, setByte, setBytes, setBytes, setBytes, setChar, setChar, setChar, setDataObject, setDataObject, setDataObject, setDate, setDate, setDate, setDouble, setDouble, setDouble, setFloat, setFloat, setFloat, setInt, setInt, setInt, setList, setList, setList, setLong, setLong, setLong, setShort, setShort, setShort, setString, setString, setString, unset, unset, unset
 

Field Detail

UNAVAILABLE_PROPERTY

static final java.lang.Object UNAVAILABLE_PROPERTY
Marker value for unavailable properties

Method Detail

isAvailable

boolean isAvailable(Property property)

setUnavailable

void setUnavailable(Property property)
Strips the property such that is no longer available.


isProxy

boolean isProxy()
Returns:
If this data object is a proxy. Proxies only have their identity property available.

getIdentity

java.lang.Object getIdentity()
Returns:
The value of the identity property for this instance.

setIdentity

void setIdentity(java.lang.Object object)
Sets the value of the identity property for this instance.


getType

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

The type defines the Properties available for reflective access.

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

getContainmentProperty

Property getContainmentProperty()
Description copied from interface: DataObject
Return the Property of the data object containing this data object or null if there is no container.

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

getContainer

PartialDataObject getContainer()
Description copied from interface: DataObject
Returns the containing data object or null if there is no container.

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

getDataObject

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

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

getDataObject

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

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

getDataObject

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

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

createDataObject

PartialDataObject createDataObject(java.lang.String name)
Description copied from interface: DataObject
Returns a new data object contained by this object using the specified property, which must be a containment property. The type of the created object is the declared type of the specified property.

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

createDataObject

PartialDataObject createDataObject(int index)
Description copied from interface: DataObject
Returns a new data object contained by this object using the specified property, which must be a containment property. The type of the created object is the declared type of the specified property.

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

createDataObject

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

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

createDataObject

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

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

createDataObject

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

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

createDataObject

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

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


Copyright © 2007. All Rights Reserved.