ch.elca.el4j.services.persistence.generic.primarykey
Class UuidPrimaryKeyGenerator

java.lang.Object
  extended by ch.elca.el4j.services.persistence.generic.primarykey.UuidPrimaryKeyGenerator
All Implemented Interfaces:
PrimaryKeyGenerator, Serializable

public class UuidPrimaryKeyGenerator
extends Object
implements PrimaryKeyGenerator

This key generator generates UUIDs as described in "EJB Design Patterns", F. Marinescu, pages 112-116. It is a simplified version of the algorithm presented in http://www1.ics.uci.edu/~ejw/authoring/uuid-guid/draft-leach-uuids-guids-01.txt The returned UUID is a hex-encoded 32-digit number.

Author:
Martin Zeltner (MZE)
See Also:
Serialized Form
File-location:
UuidPrimaryKeyGenerator
Last check-in date:
2009-12-01 10:59:54 +0100 (Di, 01. Dez 2009) by jonasha for revision 4010

Constructor Summary
UuidPrimaryKeyGenerator()
          Default constructor.
 
Method Summary
 String getPrimaryKey()
          Method to get a generated primary key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UuidPrimaryKeyGenerator

public UuidPrimaryKeyGenerator()
Default constructor.

Method Detail

getPrimaryKey

public String getPrimaryKey()
Method to get a generated primary key.

Specified by:
getPrimaryKey in interface PrimaryKeyGenerator
Returns:
Returns generated primary key.


Copyright © 2005-2011 ELCA. All Rights Reserved.