org.datanucleus.store.neodatis.valuegenerator
Class NeoDatisIncrementGenerator
java.lang.Object
org.datanucleus.store.valuegenerator.AbstractGenerator
org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator
org.datanucleus.store.neodatis.valuegenerator.NeoDatisIncrementGenerator
- All Implemented Interfaces:
- org.datanucleus.store.valuegenerator.ValueGenerator
public class NeoDatisIncrementGenerator
- extends org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator
Value generator for NeoDatis that provides increment/sequence like generation.
Utilises the persistence of objects of NucleusSequence.
Each objects stores the sequence class/field name and the current value of that sequence.
|
Field Summary |
protected static org.datanucleus.util.Localiser |
LOCALISER_DB4O
Localiser for messages. |
| Fields inherited from class org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator |
connectionProvider, storeMgr |
| Fields inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator |
allocationSize, block, initialValue, LOCALISER, name, properties, repositoryExists |
|
Method Summary |
protected org.datanucleus.store.valuegenerator.ValueGenerationBlock |
obtainGenerationBlock(int number)
Get a new PoidBlock with the specified number of ids. |
protected org.datanucleus.store.valuegenerator.ValueGenerationBlock |
reserveBlock(long size)
Method to reserve a block of "size" identities. |
| Methods inherited from class org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator |
setConnectionProvider, setStoreManager |
| Methods inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator |
allocate, createRepository, current, currentValue, getName, getStorageClass, next, nextValue, obtainGenerationBlock, repositoryExists, requiresRepository, reserveBlock |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCALISER_DB4O
protected static final org.datanucleus.util.Localiser LOCALISER_DB4O
- Localiser for messages.
NeoDatisIncrementGenerator
public NeoDatisIncrementGenerator(java.lang.String name,
java.util.Properties props)
- Constructor.
- Parameters:
name - Symbolic name for this generatorprops - Properties defining the behaviour of this generator
obtainGenerationBlock
protected org.datanucleus.store.valuegenerator.ValueGenerationBlock obtainGenerationBlock(int number)
- Get a new PoidBlock with the specified number of ids.
- Overrides:
obtainGenerationBlock in class org.datanucleus.store.valuegenerator.AbstractGenerator
- Parameters:
number - The number of additional ids required
- Returns:
- the PoidBlock
reserveBlock
protected org.datanucleus.store.valuegenerator.ValueGenerationBlock reserveBlock(long size)
- Method to reserve a block of "size" identities.
- Specified by:
reserveBlock in class org.datanucleus.store.valuegenerator.AbstractGenerator
- Parameters:
size - Block size
- Returns:
- The reserved block
Copyright © 2009. All Rights Reserved.