org.datanucleus.store.rdbms.valuegenerator
Class AbstractRDBMSGenerator
java.lang.Object
org.datanucleus.store.valuegenerator.AbstractGenerator
org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator
org.datanucleus.store.rdbms.valuegenerator.AbstractRDBMSGenerator
- All Implemented Interfaces:
- org.datanucleus.store.valuegenerator.ValueGenerator
- Direct Known Subclasses:
- DatastoreUUIDHexGenerator, MaxGenerator, SequenceGenerator, TableGenerator
public abstract class AbstractRDBMSGenerator
- extends org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator
Abstract representation of a ValueGenerator for RDBMS datastores.
Builds on the base AbstractValueGenerator, and providing datastore connection
and StoreManager information.
|
Field Summary |
protected org.datanucleus.store.connection.ManagedConnection |
connection
Connection to the datastore. |
protected static org.datanucleus.util.Localiser |
LOCALISER_RDBMS
Localiser for messages specific to RDBMS generators. |
| 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. |
boolean |
requiresConnection()
Method to reply if the generator requires a connection. |
| 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, reserveBlock |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCALISER_RDBMS
protected static final org.datanucleus.util.Localiser LOCALISER_RDBMS
- Localiser for messages specific to RDBMS generators.
connection
protected org.datanucleus.store.connection.ManagedConnection connection
- Connection to the datastore.
AbstractRDBMSGenerator
public AbstractRDBMSGenerator(String name,
Properties props)
- Constructor.
- Parameters:
name - Symbolic name for the generatorprops - Properties controlling the behaviour of the generator
requiresConnection
public boolean requiresConnection()
- Method to reply if the generator requires a connection.
- Returns:
- Whether a connection is required.
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
Copyright © 2012. All Rights Reserved.