com.ibm.mm.sdk.common

Class DKPid

  1. java.lang.Object
  2. extended bycom.ibm.mm.sdk.common.DKPid
All implemented interfaces:
java.io.Serializable
Direct known subclasses:
DKPidICM, DKPidIP, DKPidXDO

  1. public class DKPid
  2. extends java.lang.Object
  3. implements java.io.Serializable
This class represents a PID (Persistent identifier) object. A persistent data identifier (PID) is a unique identifier for locating persistent data objects in a set of known datastores. A dkDataObject must have a PID in order to store its data.
See Also:
Serialized Form

Constructor Summary

Constructor and Description
DKPid()
Constructs a PID object
DKPid(DKPid pid)
Constructs a PID from another PID
DKPid(int idStringCount)
Constructs a PID object
DKPid(java.lang.String sourcePidString)
Constructs a PID object from a PID string representation.

Method Summary

Modifier and Type Method and Description
  1. java.lang.Object
clone()
Clone
  1. boolean
equals(java.lang.Object otherObject)
Compares this PID if it is equal to another PID.
  1. java.lang.String
getDatastoreName()
Gets the datastore name from this PID
  1. java.lang.String
getDatastoreType()
Gets the datastore type from this PID
  1. java.lang.String
getId()
Deprecated. Replace by getPrimaryId
  1. java.lang.String
getIdString()
Gets the datastore specific persistent-id of the owner data-object.
  1. java.lang.String
getIdString(int index)
Gets id string by index (0 to n-1)
  1. int
getIdStringCount()
Gets id string count
  1. java.lang.String
getObjectType()
Gets the type of the data-object owning this PID
  1. java.lang.String
getPrimaryId()
Gets the datastore specific primary persistent-id
  1. boolean
isSet()
Returns true if all components of this Pid are set to their intended values.
  1. java.lang.String
pidString()
Gets the string representation of the PID.
  1. java.lang.String
pidType()
Gets the PID type
  1. void
setDatastoreName(java.lang.String sourceDatastoreName)
Sets the datastore name of this PID
  1. void
setDatastoreType(java.lang.String sourceDatastoreType)
Sets the datastore type of this PID
  1. void
setId(java.lang.String sourceId)
Deprecated. Replace by setPrimaryId
  1. void
setIdString(int index,java.lang.String idStringItem)
Sets id string by index (0 to n-1)
  1. void
setIdString(java.lang.String sourceId)
Sets the datastore specific persistent-id for the owner data-object.
  1. void
setIdStringCount(int idStringCount)
Sets id string count
  1. void
setObjectType(java.lang.String sourceObjectType)
Sets the type of the data-object owning this Pid.
  1. void
setPrimaryId(java.lang.String primaryId)
Sets the datastore specific primary persistent-id
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DKPid

  1. public DKPid()
Constructs a PID object

DKPid

  1. public DKPid(int idStringCount)
Constructs a PID object
Parameters:
idStringCount - string id count

DKPid

  1. public DKPid(java.lang.String sourcePidString)
  2. throws DKException
Constructs a PID object from a PID string representation.
Parameters:
sourcePidString - the PID string, a string obtained by calling the pidString() method in the PID
Throws:

DKPid

  1. public DKPid(DKPid pid)
Constructs a PID from another PID
Parameters:
pid - the other PID

Method Detail

getDatastoreType

  1. public java.lang.String getDatastoreType( )
Gets the datastore type from this PID
Returns:
the datastore type

setDatastoreType

  1. public void setDatastoreType(java.lang.String sourceDatastoreType)
Sets the datastore type of this PID
Parameters:
sourceDatastoreType - datastore type.

getDatastoreName

  1. public java.lang.String getDatastoreName( )
Gets the datastore name from this PID
Returns:
the datastore name

setDatastoreName

  1. public void setDatastoreName(java.lang.String sourceDatastoreName)
Sets the datastore name of this PID
Parameters:
sourceDatastoreName - datastore name

getId

  1. public java.lang.String getId()
Deprecated. Replace by getPrimaryId
Gets the datastore specific persistent-id of the owner data-object. This id contains information to locate the persistent data, of the owner data-object, in the datastore.
Returns:
the datastore persistent-id .
See Also:

setId

  1. public void setId(java.lang.String sourceId)
Deprecated. Replace by setPrimaryId
Sets the datastore specific persistent-id for the owner data-object.
Parameters:
sourceId - datastore persistent-id
See Also:

getIdString

  1. public java.lang.String getIdString( )
Gets the datastore specific persistent-id of the owner data-object. This id contains information to locate the persistent data, of the owner data-object, in the datastore.
Returns:
the datastore persistent-id .

setIdString

  1. public void setIdString(java.lang.String sourceId)
Sets the datastore specific persistent-id for the owner data-object. The user should also set the item id whenever the id string is set.
Parameters:
sourceId - datastore persistent-id

getPrimaryId

  1. public java.lang.String getPrimaryId( )
Gets the datastore specific primary persistent-id
Returns:
the datastore primary persistent-id

setPrimaryId

  1. public void setPrimaryId(java.lang.String primaryId)
Sets the datastore specific primary persistent-id
Parameters:
primaryId - datastore primary persistent-id

pidString

  1. public java.lang.String pidString( )
Gets the string representation of the PID. This string is of internal format and not to be parsed by users. This string can be used as an input parameter to re-construct the PID using the proper constructor.
Returns:
string representation of the PID
See Also:

getObjectType

  1. public java.lang.String getObjectType( )
Gets the type of the data-object owning this PID
Returns:
the object type

setObjectType

  1. public void setObjectType(java.lang.String sourceObjectType)
Sets the type of the data-object owning this Pid.

isSet

  1. public boolean isSet()
Returns true if all components of this Pid are set to their intended values.
Returns:
true or false.

getIdStringCount

  1. public int getIdStringCount()
Gets id string count
Returns:
the id string count

setIdStringCount

  1. public void setIdStringCount(int idStringCount)
Sets id string count
Parameters:
idStringCount - the id string count

getIdString

  1. public java.lang.String getIdString( int index)
  2. throws DKException
Gets id string by index (0 to n-1)
Parameters:
index - the index of a part of the id string
Returns:
a part of the id string by index
Throws:

setIdString

  1. public void setIdString(int index,
  2. java.lang.String idStringItem)
  3. throws DKException
Sets id string by index (0 to n-1)
Parameters:
index - the index of a part of the id string
idStringItem - a part of the id string
Throws:

equals

  1. public boolean equals(java.lang.Object otherObject)
Compares this PID if it is equal to another PID. All data-members are compared for equality.
Overrides:
equals in class java.lang.Object
Parameters:
otherObject - the other PID

clone

  1. public java.lang.Object clone()
Clone
Overrides:
clone in class java.lang.Object
Returns:
the a copy of PID

pidType

  1. public java.lang.String pidType( )
Gets the PID type
Returns:
the PID type