Ensure Entities use the new Key Set

All of the entities that form part of the Business Object Type must use keys generated using the new Key Set. This includes the Initial Entity, the Child Entities and the Relative Entities. So, in the example, all of the entities that constitute the User Business object must use keys generated using the UserBOMKS key set. This mechanism for achieving this depends on whether the entity uses Auto ID Generation, or invokes the Key Server directly.

Auto ID Generation

Most entities use the key server implicitly – that is, keys are generated automatically when insert operations are invoked. This is known as Auto ID generation. In order to configure these entities to use the RAKS, use the following procedure:

Code that invokes the Key Server directly

The Key Server can also be invoked directly, in code. This is achieved by directly invoking on the one of the curam.util.type.UniqueID class' static methods – usually the nextUniqueID() method. Typically, code that invokes the standard Key Server will be along the following lines:

ToDoDtls toDoDtls = new ToDoDtls();
toDoDtls.toDoID = UniqueID.nextUniqueID();

In order to use the RAKS, this code should be changed as follows:

UniqueIDKeySet uniqueIDKeySet = new UniqueIDKeySet();
uniqueIDKeySet.keySetName = "UserBOMKS";

ToDoDtls toDoDtls = new ToDoDtls();
toDoDtls.toDoId = UniqueID.getNextIDFromKeySet(uniqueIDKeySet);