|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.sdk.common.dkAbstractDataObjectBase | +--com.ibm.mm.sdk.common.dkDataObject | +--com.ibm.mm.sdk.common.DKDDOBase
DKDDOBase is the base class to represents Dynamic Data Object (DDO).
Dynamic Data Object is the main class for transferring data in and out of persistent store. It is a self describing data object flexible enough for representing data originated from heterogenous stores. Currently, DDO has been used for representing data objects from about a dozen or more disparate data sources.
A DDO is essentially a container for data-items, such as EmployeeNo, Name, Address, VideoClip, myPicture, etc. Sometimes data-items are also called attributes. A data-item has a name, properties, and a value(s). The name is usually a string, like "EmployeeNo", "myPicutre", etc. Properties describe the characteristics of this data-item, for example, its basic type, like integer, string, decimal, etc. Non basic types are also supported, such as referce to other data objects, reference to a collection of strings, shorts, and other types. Other useful properties are nullablility: nullable or non-nullable, persistency: transient or persistent, updatabiliy: read-write or read-only, and other application dependent properties. Depending on the underlying back-end datastore support, properties can be persistent, that is, saved in the persistent store, or transient, only represented in memory. In addition to properties of a data-item, the DDO itself can have properties appicable to the whole DDO, like DDO type. The DDO class provides methods for adding data-items and properties, getting and setting properties, and more importantly, getting and setting data-item values.
Data-items are quite flexible for representing data from different groups or domains. To avoid naming collision between these groups. The DDO class supports namespace for data-item names. Content Manager supports DK_CM_NAMESPACE_ATTR, DK_CM_NAMESPACE_LINK, and DK_CM_NAMESPACE_CHILD namespaces, for organizing attribue, link and child data-item names.
Note: Names are case sensitive, and data-items and property position starts from 1 not from 0.
A DDO has a persistent identifier (PID), which is used for locating the data object in the persistent store during retrieve, update nad delete operations. A PID contains information on datastore name, datastore type or entity name, and the address of the data object itself according to the underlying persistent store. See the class DKPid for details.
The DDO implementation is based on OMG Persistent Object Services (POS) specification available at http://cgi.omg.org/docs/formatl/97-12-12.pdf
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant |
For details, see the class or interface |
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId |
For details, see the class or interface |
Constructor Summary | |
DKDDOBase()
Constructs a DDO Base object. |
|
DKDDOBase(DKDDOBase ddo)
Constructs a DDO Base object from an existing DDO Base (copy contructor). |
|
DKDDOBase(DKPid pid)
Constructs a DDO Base object with a given Pid. |
|
DKDDOBase(DKPid pid,
short initialSize)
Constructs a DDO Base object with a given Pid and an initial number of data-items. |
|
DKDDOBase(short initialSize)
Constructs a DDO Base object which has enough space for the given initial number of data-items. |
|
DKDDOBase(java.lang.String objectType)
Constructs a DDO Base object for a given object type. |
|
DKDDOBase(java.lang.String objectType,
short initialSize)
Constructs a DDO Base object for a given object type, with an initial number of data-items. |
Method Summary | |
short |
addData()
Adds a new data-item to this data-object and returns the new data-item number (data-id). |
short |
addData(java.lang.String data_name)
Adds a new data-item with the given name to this data-object and returns the new data-item number (data-id). |
short |
addData(java.lang.String name_space,
java.lang.String data_name)
Adds a new data-item with the given namespace and name to this data-object and returns the new data-item number (data-id). |
short |
addDataProperty(short data_id)
Adds a new property to a given data-item and returns the new property number (property-id). |
short |
addDataProperty(short data_id,
java.lang.String property_name)
Adds a new property with the given name to the data-item and returns the new property number (property-id). |
short |
addDataProperty(short data_id,
java.lang.String property_name,
java.lang.Object property_value)
Adds a new property with the given name and value to the data-item and returns the new property number (property-id). |
short |
addProperty()
Adds a new property to this DDO and returns the new property number (property-id). |
short |
addProperty(java.lang.String property_name)
Adds a new property with a given name to this DDO and returns the new property number (property-id). |
short |
addProperty(java.lang.String property_name,
java.lang.Object property_value)
Adds a new property with a given name and value to this DDO. |
short |
dataCount()
Gets the number of data-items in this data-object. |
short |
dataId(java.lang.String data_name)
Gets the data-id of a given data-item name. |
short |
dataId(java.lang.String name_space,
java.lang.String data_name)
Gets the data-id of a given data-item namespace and data-item name. |
short[] |
dataIdsByNameSpace(java.lang.String name_space)
Gets an array of data-ids defined in the given namespace. |
short |
dataNameSpaceCount()
Returns the namespace count |
short |
dataPropertyCount(short data_id)
Gets the number of properties associated with this data-item. |
short |
dataPropertyId(short data_id,
java.lang.String data_property_name)
Gets the property-id of a given property-name in a data-item. |
java.lang.Object |
getData(short data_id)
Gets the value of a given data-item. |
java.lang.Object |
getDataByName(java.lang.String data_name)
Gets the value of a data-item given its name. |
java.lang.Object |
getDataByName(java.lang.String name_space,
java.lang.String data_name)
Gets the value of a data-item given its namespace and name. |
java.lang.String |
getDataName(short data_id)
Gets the name of a given data-item. |
java.lang.String |
getDataNameSpace(short data_id)
Gets the namespace of a given data-item. |
java.lang.Object |
getDataProperty(short data_id,
short property_id)
Gets the value of a given property in a data-item. |
java.lang.Object |
getDataPropertyByName(short data_id,
java.lang.String data_property_name)
Gets the value of a given property-name of a data-item id. |
java.lang.Object |
getDataPropertyByName(java.lang.String data_name,
java.lang.String data_property_name)
Gets the value of a given property-name of a data-item name. |
java.lang.Object |
getDataPropertyByName(java.lang.String name_space,
java.lang.String data_name,
java.lang.String data_property_name)
Gets the value of a given property-name of a data-item name in data-item namespace. |
java.lang.String |
getDataPropertyName(short data_id,
short property_id)
Gets the name of a given property in a data-item. |
java.lang.String |
getObjectType()
Gets the type of this data-object. |
java.lang.Object |
getProperty(short property_id)
Gets the value of a given property in this DDO. |
java.lang.Object |
getPropertyByName(java.lang.String property_name)
Gets the value of a given property-name in this DDO. |
java.lang.String |
getPropertyName(short property_id)
Gets the name of a given property in this DDO. |
boolean |
isDataPropertySet(short data_id,
short property_id)
Returns true if a given property of a data-item is set. |
boolean |
isDataSet(short data_id)
Returns true if this data-item has been set to a value. |
boolean |
isNull(short data_id)
Returns true if the value of this data-item is null. |
boolean |
isPropertySet(short property_id)
Returns true if the given property in this DDO has been set to a value. |
short |
propertyCount()
Gets the number of properties associated with this DDO. |
short |
propertyId(java.lang.String property_name)
Gets the property-id of a given property-name in this DDO. |
short |
protocol()
Returns the protocol type supported by this data-object. |
void |
setData(short data_id,
java.lang.Object data_value)
Sets the value of a given data-item. |
void |
setDataName(short data_id,
java.lang.String data_name)
Sets the name of a given data-item. |
void |
setDataName(short data_id,
java.lang.String name_space,
java.lang.String data_name)
Sets the namespace and the name of a given data-item. |
void |
setDataNameSpace(short data_id,
java.lang.String name_space)
Sets the namespace of a given data-item. |
void |
setDataProperty(short data_id,
short property_id,
java.lang.Object property_value)
Sets the value of a given property in a data-item. |
void |
setDataPropertyName(short data_id,
short property_id,
java.lang.String property_name)
Sets the name of a given property in a data-item. |
void |
setNull(short data_id)
Sets the value of a data-item to a null value. |
void |
setObjectType(java.lang.String toObjectType)
Sets the type of this data-object and synchronizes it with the object type of its Pid. |
void |
setProperty(short property_id,
java.lang.Object property_value)
Sets the value of a given property in this DDO. |
void |
setPropertyName(short property_id,
java.lang.String property_name)
Sets the name of a given property in this DDO. |
boolean |
updatable()
Returns true if this data object is updatable. |
Methods inherited from class com.ibm.mm.sdk.common.dkDataObject |
getPid, getPidObject, setPid, setPidObject |
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractDataObjectBase |
getParent, getRootObject, setParent, setRootObject |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DKDDOBase()
public DKDDOBase(short initialSize)
initialSize
- initial number of data items.public DKDDOBase(DKDDOBase ddo)
ddo
- a DDO Base object.public DKDDOBase(java.lang.String objectType)
objectType
- the object type which usually corresponds to
an entity name.public DKDDOBase(java.lang.String objectType, short initialSize)
objectType
- the object type.initialSize
- initial number of data items.public DKDDOBase(DKPid pid)
pid
- the Pid object.public DKDDOBase(DKPid pid, short initialSize)
pid
- the Pid object.initialSize
- initial number of data items.Method Detail |
public short protocol()
protocol
in class dkAbstractDataObjectBase
public java.lang.String getObjectType()
getObjectType
in class dkAbstractDataObjectBase
public void setObjectType(java.lang.String toObjectType)
toObjectType
- the object type.getObjectType()
public boolean updatable()
public short addData() throws DKUsageError
public short addData(java.lang.String data_name) throws DKUsageError
data_name
- data-item name.DKUsageError
- if the data-item name already exist.public short addDataProperty(short data_id) throws DKUsageError
data_id
- data-id.DKUsageError
- if the data-id is invalid.public short addDataProperty(short data_id, java.lang.String property_name) throws DKUsageError
data_id
- data id.property_name
- property name.DKUsageError
- if the data-id is invalid, or property name
already exists or invalid.public short addDataProperty(short data_id, java.lang.String property_name, java.lang.Object property_value) throws DKUsageError
data_id
- the data-id.property_name
- property name.property_value
- property value.DKUsageError
- if the data-id is invalid, or property name
already exists or invalid.public short dataCount()
public short dataPropertyCount(short data_id) throws DKUsageError
data_id
- the data-id.DKUsageError
- if the data-id is invalid.public void setDataProperty(short data_id, short property_id, java.lang.Object property_value) throws DKUsageError
data_id
- data-id.property_id
- property-id.property_value
- the property value.DKUsageError
- if the data-id is invalid, or property id
is invalid.public java.lang.Object getDataProperty(short data_id, short property_id) throws DKUsageError
data_id
- data-id.property_id
- property-id.DKUsageError
- if the data-id is invalid, or property id
is invalid.public void setDataPropertyName(short data_id, short property_id, java.lang.String property_name) throws DKUsageError
data_id
- data-id.property_id
- property-id.property_name
- property name.DKUsageError
- if the data-id is invalid, or property id
is invalid.public java.lang.String getDataPropertyName(short data_id, short property_id) throws DKUsageError
data_id
- data-id.property_id
- property-id.DKUsageError
- if the data-id is invalid, or property id
is invalid.public void setData(short data_id, java.lang.Object data_value) throws DKUsageError
data_id
- data-id.data_value
- data value.DKUsageError
- if the data-id is invalid.public java.lang.Object getData(short data_id) throws DKUsageError
data_id
- data-id.DKUsageError
- if the data-id is invalid.public void setDataName(short data_id, java.lang.String data_name) throws DKUsageError
data_id
- data-id.data_name
- data name.DKUsageError
- if the data-id is invalid.public java.lang.String getDataName(short data_id) throws DKUsageError
data_id
- data id.DKUsageError
- if the data-id is invalid.public short dataId(java.lang.String data_name) throws DKUsageError
data_name
- data name.DKUsageError
- if the data-item name is not found.public short dataPropertyId(short data_id, java.lang.String data_property_name) throws DKUsageError
data_id
- data-id.data_property_name
- data-property name.DKUsageError
- if the data-id is invalid, or property name
is invalid.public java.lang.Object getDataByName(java.lang.String data_name) throws DKUsageError
data_name
- data-item name.DKUsageError
- if the data-item name is not found.public java.lang.Object getDataPropertyByName(short data_id, java.lang.String data_property_name) throws DKUsageError
data_id
- data-id.data_property_name
- data-property name.DKUsageError
- if the data-id is invalid, or property name
is not found.public java.lang.Object getDataPropertyByName(java.lang.String data_name, java.lang.String data_property_name) throws DKUsageError
data_name
- data-item name.data_property_name
- data-property name.DKUsageError
- if the data-item name is not found
or property name
is not found.public void setNull(short data_id) throws DKUsageError
data_id
- data-id.DKUsageError
- if the data-id is invalidpublic boolean isNull(short data_id) throws DKUsageError
data_id
- data-id.DKUsageError
- if the data-id is invalidpublic boolean isDataSet(short data_id) throws DKUsageError
data_id
- data-id.DKUsageError
- if the data-id is invalidpublic boolean isDataPropertySet(short data_id, short property_id) throws DKUsageError
data_id
- data-id.property_id
- property-id.DKUsageError
- if the data-id is invalid or property-id
is invalid.public short addProperty() throws DKUsageError
public short addProperty(java.lang.String property_name) throws DKUsageError
property_name
- property name.DKUsageError
- if the property name already existspublic short addProperty(java.lang.String property_name, java.lang.Object property_value) throws DKUsageError
property_name
- property-name.property_value
- property value.DKUsageError
- if the property name already existspublic short propertyCount() throws DKUsageError
public void setProperty(short property_id, java.lang.Object property_value) throws DKUsageError
property_id
- property-id.property_value
- property value.DKUsageError
- if the property-id is not foundpublic java.lang.Object getProperty(short property_id) throws DKUsageError
property_id
- property-id.DKUsageError
- if the property-id is not foundpublic void setPropertyName(short property_id, java.lang.String property_name) throws DKUsageError
property_id
- property-id.property_name
- property name.DKUsageError
- if the property-id is not foundpublic java.lang.String getPropertyName(short property_id) throws DKUsageError
property_id
- property-id.DKUsageError
- if the property-id is not foundpublic short propertyId(java.lang.String property_name) throws DKUsageError
property_name
- property-name.DKUsageError
- if the property-name is not foundpublic java.lang.Object getPropertyByName(java.lang.String property_name) throws DKUsageError
property_name
- property-name.DKUsageError
- if the property-name is not foundpublic boolean isPropertySet(short property_id) throws DKUsageError
property_id
- property-id.DKUsageError
- if the property-id is not foundpublic short dataNameSpaceCount()
public short[] dataIdsByNameSpace(java.lang.String name_space) throws DKUsageError
name_space
- data namespace. See description at the
header of this class for valid namespacespublic short dataId(java.lang.String name_space, java.lang.String data_name) throws DKUsageError
name_space
- data namespace.data_name
- data name.DKUsageError
- if the namespace or data-item name is not foundpublic java.lang.Object getDataByName(java.lang.String name_space, java.lang.String data_name) throws DKUsageError
name_space
- data namespace.data_name
- data-item name.DKUsageError
- if the namespace or data-item name is not foundpublic java.lang.Object getDataPropertyByName(java.lang.String name_space, java.lang.String data_name, java.lang.String data_property_name) throws DKUsageError
name_space
- data namespace.data_name
- data-item name.data_property_name
- data-property name.DKUsageError
- if the namespace, data-item name or
data-property name is not foundpublic void setDataName(short data_id, java.lang.String name_space, java.lang.String data_name) throws DKUsageError
data_id
- data-id.name_space
- data namespace.data_name
- data name.DKUsageError
- if the data-id is invalid, or the data-item
name already existspublic void setDataNameSpace(short data_id, java.lang.String name_space) throws DKUsageError
data_id
- data-id.name_space
- data namespace.DKUsageError
- if the data-id is invalidpublic java.lang.String getDataNameSpace(short data_id) throws DKUsageError
data_id
- data id.DKUsageError
- if the data-id is invalidpublic short addData(java.lang.String name_space, java.lang.String data_name) throws DKUsageError
name_space
- data-item namespace.data_name
- data-item name.DKUsageError
- if the data-item name already exists
|
EIP Java APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |