Each DDO must have a persistent identifier (PID). The PID contains information about a particular content server, such as the datastore name, datastore type, and object type.
The PID identifies the persistent data location of the DDO. For example, in earlier versions of IBM® Content Manager, the PID contained the item ID. The item ID is one of the most important parameters for the retrieve, update, and delete functions in earlier versions of IBM Content Manager. In IBM Content Manager Version 8 and later, the PID has additional information, such as item ID and component ID.
The IBM Content Manager Version 8 datastore createDDO method creates a PID object for the DDO object created. During the add operation, the datastore populates the PID object with information such as the item ID.
The following examples demonstrate how to create a DDO for retrieving a known item:
// Given a connected DKDatastoreICM object named "dsICM"
// Create a new DDO
DKDDO ddo = dsICM.createDDO("book",DKConstant.DK_CM_DOCUMENT);
// PID automatically created by the noted function.
ddo.add(); // Add the new item to the datastore.
// PID Completed by the System
DKPidICM pid = (DKPidICM) ddo.getPidObject();
// Given a connected DKDatastoreICM object named "dsICM"
// Create a new DDO
DKDDO* ddo = dsICM->createDDO("book",DK_CM_DOCUMENT);
// PID automatically created by the noted function.
ddo->add(); // Add the new item to the datastore.
// PID Completed by the System
DKPidICM* pid = (DKPidICM*) ddo->getPidObject();
The IBM Content Manager Version 8 connector has a PID class called DKPidICM, which is a subclass of DKPid. The DKPidICM object is used by the DKDDO and subclasses of dkResource.
