Class AbstractUUIDGenerator
- java.lang.Object
-
- org.datanucleus.store.valuegenerator.AbstractGenerator<String>
-
- org.datanucleus.store.valuegenerator.AbstractUUIDGenerator
-
- All Implemented Interfaces:
ValueGenerator<String>
- Direct Known Subclasses:
UUIDHexGenerator
,UUIDStringGenerator
public abstract class AbstractUUIDGenerator extends AbstractGenerator<String>
Value generator for a UUID format. To be extended by implementations giving the UUID in particular forms.
-
-
Field Summary
-
Fields inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocationSize, block, initialValue, name, storeMgr
-
Fields inherited from interface org.datanucleus.store.valuegenerator.ValueGenerator
PROPERTY_CATALOG_NAME, PROPERTY_CLASS_NAME, PROPERTY_COLUMN_NAME, PROPERTY_FIELD_NAME, PROPERTY_KEY_CACHE_SIZE, PROPERTY_KEY_DATABASE_CACHE_SIZE, PROPERTY_KEY_INITIAL_VALUE, PROPERTY_KEY_MAX_VALUE, PROPERTY_KEY_MIN_VALUE, PROPERTY_ROOT_CLASS_NAME, PROPERTY_SCHEMA_NAME, PROPERTY_SEQUENCE_NAME, PROPERTY_SEQUENCETABLE_CATALOG, PROPERTY_SEQUENCETABLE_NAME_COLUMN, PROPERTY_SEQUENCETABLE_NEXTVAL_COLUMN, PROPERTY_SEQUENCETABLE_SCHEMA, PROPERTY_SEQUENCETABLE_TABLE, PROPERTY_TABLE_NAME
-
-
Constructor Summary
Constructors Constructor Description AbstractUUIDGenerator(StoreManager storeMgr, String name)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected short
getCount()
Simple counter for identities.protected abstract String
getIdentifier()
Create an identifier in the required UUID format required.static Class
getStorageClass()
Accessor for the storage class for values generated with this generator.protected ValueGenerationBlock<String>
reserveBlock(long size)
Method to reserve "size" values to the block.-
Methods inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocate, current, currentValue, getName, next, nextValue, obtainGenerationBlock, obtainGenerationBlock, reserveBlock
-
-
-
-
Constructor Detail
-
AbstractUUIDGenerator
public AbstractUUIDGenerator(StoreManager storeMgr, String name)
Constructor.- Parameters:
storeMgr
- StoreManagername
- Symbolic name for this generator
-
-
Method Detail
-
getStorageClass
public static Class getStorageClass()
Accessor for the storage class for values generated with this generator.- Returns:
- Storage class (in this case String.class)
-
reserveBlock
protected ValueGenerationBlock<String> reserveBlock(long size)
Method to reserve "size" values to the block.- Specified by:
reserveBlock
in classAbstractGenerator<String>
- Parameters:
size
- The block size- Returns:
- The reserved block
-
getIdentifier
protected abstract String getIdentifier()
Create an identifier in the required UUID format required.- Returns:
- The identifier
-
getCount
protected short getCount()
Simple counter for identities.- Returns:
- The next count value
-
-