Unique and persistent ID generation framework

The unique and persistent ID generation framework provides the ability to:

An example use of the framework is to generate party identifiers that become persistent identifiers that live across collapse party transactions.

You can use the unique and persistent ID generation framework to add domain-specific identifier generators and plug any custom generators by following the programming model prescribed by the framework. The enhancement to the framework is implemented as asset of interfaces and the default implementation. The framework also exposes configuration properties that can be used for hooking custom generators.

The framework provides default implementations for generating generic identifiers and party identifiers. This implementation can be invoked by business applications to obtain an identifier that can be used as a primary or candidate key.

Extended Key generation framework
In keeping with OSGi implementation, there is a new service definition for ID Generators:
<service id="AlphaNumericIDGenerator" interface="com.dwl.base.MDMIDGenerator">
		<service-properties>
			<entry key="id.generator" value="com.dwl.base.util.AlphaNumericIDGenerator"/>		
		</service-properties>
		<bean class="com.dwl.base.util.AlphaNumericIDGenerator"/>
</service>

To define a new ID Generator service, the following blueprint definition must be supplied in a bundle. The service interface must be com.dwl.base.MDMIDGenerator and the service-properties (id.generator) must be set to the generator class name that is also defined in the corresponding configuration and management element. The bean represents the implementation class.

To retrieve an instance of an ID generator, the PluggableKeyGeneratorBroker utility class can be used. For example:
PluggableKeyGeneratorBroker.getIDGenerator("com.dwl.base.util.AlphaNumericIDGenerator");
In addition to other uses of ID Generators, the DWLClassFactory.getIDGenerator utility can be used to retrieve an ID Generator based on the configuration element entry configured. For example, the following will return an instance of the Numeric ID Generator class configured:
DWLClassFactory.getIDGenerator("/IBM/DWLCommonServices/IDGeneration/NumericIDGenerator/className");

See the Elements in the Configuration and Management component topic for details about these configuration elements.



Last updated: 17 May 2017