|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.SequenceImpl
public class SequenceImpl
Basic implementation of a JDO 2 datastore sequence. Utilises the org.jpox.store.poid classes to generate sequence values.
| Field Summary | |
|---|---|
protected PoidGenerator |
generator
The generator for the sequence. |
protected static Localiser |
LOCALISER
Localisation of messages |
protected PersistenceManager |
pm
The controlling PersistenceManager. |
protected SequenceMetaData |
seqMetaData
Name of the sequence. |
protected StoreManager |
storeManager
Store Manager where we obtain our sequence. |
| Constructor Summary | |
|---|---|
SequenceImpl(PersistenceManager persistenceManager,
StoreManager storeMgr,
SequenceMetaData seqmd)
Constructor. |
|
| Method Summary | |
|---|---|
void |
allocate(int additional)
Method to allocate a set of elements. |
java.lang.Object |
current()
Accessor for the current element. |
long |
currentValue()
Accessor for the current element in the sequence as a long. |
java.lang.String |
getName()
Accessor for the sequence name. |
java.lang.Object |
next()
Accessor for the next element in the sequence. |
long |
nextValue()
Accessor for the next element in the sequence as a long. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER
protected final StoreManager storeManager
protected final SequenceMetaData seqMetaData
protected final PoidGenerator generator
protected final PersistenceManager pm
| Constructor Detail |
|---|
public SequenceImpl(PersistenceManager persistenceManager,
StoreManager storeMgr,
SequenceMetaData seqmd)
persistenceManager - The PersistenceManager managing the sequencestoreMgr - Manager of the store where we obtain the sequenceseqmd - MetaData defining the sequence| Method Detail |
|---|
public java.lang.String getName()
getName in interface javax.jdo.datastore.Sequencepublic void allocate(int additional)
allocate in interface javax.jdo.datastore.Sequenceadditional - The number of additional elements to allocatepublic java.lang.Object next()
next in interface javax.jdo.datastore.Sequencepublic long nextValue()
nextValue in interface javax.jdo.datastore.Sequencejavax.jdo.JDODataStoreException - Thrown if not numericpublic java.lang.Object current()
current in interface javax.jdo.datastore.Sequencepublic long currentValue()
currentValue in interface javax.jdo.datastore.Sequencejavax.jdo.JDODataStoreException - Thrown if not numeric
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||