org.jpox.store.rdbms.poid
Class AbstractRDBMSPoidGenerator
java.lang.Object
org.jpox.store.poid.AbstractPoidGenerator
org.jpox.store.poid.AbstractDatastorePoidGenerator
org.jpox.store.rdbms.poid.AbstractRDBMSPoidGenerator
- All Implemented Interfaces:
- org.jpox.store.poid.PoidGenerator
- Direct Known Subclasses:
- DatastoreUUIDHexPoidGenerator, MaxPoidGenerator, SequencePoidGenerator, TablePoidGenerator
public abstract class AbstractRDBMSPoidGenerator
- extends org.jpox.store.poid.AbstractDatastorePoidGenerator
Abstract representation of a PoidGenerator for RDBMS datastores.
Builds on the base AbstractPoidGenerator, and providing datastore connection
and StoreManager information.
- Version:
- $Revision: 1.8 $
|
Field Summary |
protected org.jpox.ManagedConnection |
connection
Connection to the datastore. |
protected static org.jpox.util.Localiser |
LOCALISER_RDBMS
Localiser for messages specific to RDBMS generators. |
| Fields inherited from class org.jpox.store.poid.AbstractDatastorePoidGenerator |
connectionProvider, storeMgr |
| Fields inherited from class org.jpox.store.poid.AbstractPoidGenerator |
allocationSize, initialValue, LOCALISER, name, poidBlock, properties |
|
Method Summary |
protected org.jpox.store.poid.PoidBlock |
obtainPoidBlock(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.jpox.store.poid.AbstractDatastorePoidGenerator |
setConnectionProvider, setStoreManager |
| Methods inherited from class org.jpox.store.poid.AbstractPoidGenerator |
allocate, createRepository, current, currentValue, getName, getStorageClass, next, nextValue, obtainPoidBlock, 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.jpox.util.Localiser LOCALISER_RDBMS
- Localiser for messages specific to RDBMS generators.
connection
protected org.jpox.ManagedConnection connection
- Connection to the datastore.
AbstractRDBMSPoidGenerator
public AbstractRDBMSPoidGenerator(java.lang.String name,
java.util.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.
obtainPoidBlock
protected org.jpox.store.poid.PoidBlock obtainPoidBlock(int number)
- Get a new PoidBlock with the specified number of ids.
- Overrides:
obtainPoidBlock in class org.jpox.store.poid.AbstractPoidGenerator
- Parameters:
number - The number of additional ids required
- Returns:
- the PoidBlock
Copyright © -2008 . All Rights Reserved.