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:
- PoidGenerator, javax.jdo.datastore.Sequence
- Direct Known Subclasses:
- DatastoreUUIDHexPoidGenerator, MaxPoidGenerator, SequencePoidGenerator, SequenceTablePoidGenerator
- public abstract class AbstractRDBMSPoidGenerator
- extends AbstractDatastorePoidGenerator
Abstract representation of a PoidGenerator for RDBMS datastores.
Builds on the base AbstractPoidGenerator, and providing datastore connection
and StoreManager information.
- Version:
- $Revision: 1.5 $
Field Summary |
protected java.sql.Connection |
connection
Connection to the datastore. |
protected static Localiser |
LOCALISER_RDBMS
Localiser for messages specific to RDBMS generators. |
Methods inherited from class org.jpox.store.poid.AbstractPoidGenerator |
allocate, createRepository, current, currentValue, getName, 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 Localiser LOCALISER_RDBMS
- Localiser for messages specific to RDBMS generators.
connection
protected java.sql.Connection 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 PoidBlock obtainPoidBlock(int number)
- Get a new PoidBlock with the specified number of ids.
- Overrides:
obtainPoidBlock
in class AbstractPoidGenerator
- Parameters:
number
- The number of additional ids required
- Returns:
- the PoidBlock
Copyright © -2007 . All Rights Reserved.