org.datanucleus.store.valuegenerator
Class UUIDGenerator

java.lang.Object
  extended by org.datanucleus.store.valuegenerator.AbstractGenerator
      extended by org.datanucleus.store.valuegenerator.AbstractUIDGenerator
          extended by org.datanucleus.store.valuegenerator.UUIDGenerator
All Implemented Interfaces:
ValueGenerator

public class UUIDGenerator
extends AbstractUIDGenerator

Value generator for a UUID utilising the JDK UUID class (128-bit, 36 character). Results in Strings of length 36 characters, like "2cdb8cee-9134-453f-9d7a-14c0ae8184c6".


Field Summary
 
Fields inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocationSize, block, initialValue, LOCALISER, name, properties, repositoryExists
 
Constructor Summary
UUIDGenerator(java.lang.String name, java.util.Properties props)
          Constructor.
 
Method Summary
protected  java.lang.String getIdentifier()
          Create an identifier with the form "2cdb8cee-9134-453f-9d7a-14c0ae8184c6".
 
Methods inherited from class org.datanucleus.store.valuegenerator.AbstractUIDGenerator
getStorageClass, reserveBlock
 
Methods inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocate, createRepository, current, currentValue, getName, next, nextValue, obtainGenerationBlock, obtainGenerationBlock, repositoryExists, requiresRepository, reserveBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UUIDGenerator

public UUIDGenerator(java.lang.String name,
                     java.util.Properties props)
Constructor.

Parameters:
name - Symbolic name for this generator
props - Properties controlling its behaviour
Method Detail

getIdentifier

protected java.lang.String getIdentifier()
Create an identifier with the form "2cdb8cee-9134-453f-9d7a-14c0ae8184c6".

Specified by:
getIdentifier in class AbstractUIDGenerator
Returns:
The identifier


Copyright © 2011. All Rights Reserved.