Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKPid

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.DKPid
All Implemented Interfaces:
DKMessageId, java.io.Serializable
Direct Known Subclasses:
DKPidICM, DKPidIP, DKPidQBIC, DKPidTS, DKPidXDO

public class DKPid
extends java.lang.Object
implements DKMessageId, 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

Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
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
 java.lang.Object clone()
          Clone
 boolean equals(java.lang.Object otherObject)
          Compares this PID if it is equal to another PID.
 java.lang.String getDatastoreName()
          Gets the datastore name from this PID
 java.lang.String getDatastoreType()
          Gets the datastore type from this PID
 java.lang.String getId()
          Deprecated. Replace by getPrimaryId
 java.lang.String getIdString()
          Gets the datastore specific persistent-id of the owner data-object.
 java.lang.String getIdString(int index)
          Gets id string by index (0 to n-1)
 int getIdStringCount()
          Gets id string count
 java.lang.String getObjectType()
          Gets the type of the data-object owning this PID
 java.lang.String getPrimaryId()
          Gets the datastore specific primary persistent-id
 boolean isSet()
          Returns true if all components of this Pid are set to their intended values.
 java.lang.String pidString()
          Gets the string representation of the PID.
 java.lang.String pidType()
          Gets the PID type
 void setDatastoreName(java.lang.String sourceDatastoreName)
          Sets the datastore name of this PID
 void setDatastoreType(java.lang.String sourceDatastoreType)
          Sets the datastore type of this PID
 void setId(java.lang.String sourceId)
          Deprecated. Replace by setPrimaryId
 void setIdString(int index, java.lang.String idStringItem)
          Sets id string by index (0 to n-1)
 void setIdString(java.lang.String sourceId)
          Sets the datastore specific persistent-id for the owner data-object.
 void setIdStringCount(int idStringCount)
          Sets id string count
 void setObjectType(java.lang.String sourceObjectType)
          Sets the type of the data-object owning this Pid.
 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

public DKPid()
Constructs a PID object

DKPid

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

DKPid

public DKPid(java.lang.String sourcePidString)
      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

DKPid

public DKPid(DKPid pid)
Constructs a PID from another PID
Parameters:
pid - the other PID
Method Detail

getDatastoreType

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

setDatastoreType

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

getDatastoreName

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

setDatastoreName

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

getId

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:
getPrimaryId()

setId

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:
setPrimaryId(java.lang.String)

getIdString

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

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

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

setPrimaryId

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

pidString

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:
DKPid(String sourcePidString).

getObjectType

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

setObjectType

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

isSet

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

getIdStringCount

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

setIdStringCount

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

getIdString

public java.lang.String getIdString(int index)
                             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

setIdString

public void setIdString(int index,
                        java.lang.String idStringItem)
                 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

equals

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

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

pidType

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

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.