|
Cumulus4j API (1.2.0-SNAPSHOT) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.store.model.Sequence2
public class Sequence2
Persistent sequence entity used by Cumulus4jIncrementGenerator
.
Objects are cached by DataNucleus via their primary key. Accessing an object via its OID therefore does not
require any query, if the object is already cached. Therefore, this class encodes the
keyStoreRefID
and the sequenceName
together in one
single sequenceID
, which is the (single-field) primary key for this class.
We do not use a composite primary key, because this is not supported by all underlying databases. The chosen strategy is thus the most portable and fastest.
Constructor Summary | |
---|---|
protected |
Sequence2()
Default constructor. |
protected |
Sequence2(int keyStoreRefID,
String sequenceName)
Constructor creating a Sequence with the given primary key. |
Method Summary | |
---|---|
protected static String |
createSequenceID(int keyStoreRefID,
String sequenceName)
|
int |
getKeyStoreRefID()
|
long |
getNextValue()
Get the next value (i.e. |
String |
getSequenceID()
|
String |
getSequenceName()
Get the name of the sequence. |
void |
setNextValue(long nextValue)
Set the next value (i.e. |
protected String[] |
splitSequenceID()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Sequence2()
protected Sequence2(int keyStoreRefID, String sequenceName)
Sequence
with the given primary key.
sequenceName
- the name of the sequence; must not be null
.Method Detail |
---|
protected static String createSequenceID(int keyStoreRefID, String sequenceName)
public String getSequenceID()
protected String[] splitSequenceID()
public int getKeyStoreRefID()
public String getSequenceName()
public long getNextValue()
public void setNextValue(long nextValue)
nextValue
- the next value (i.e. the first unused value) for this sequence.
|
Cumulus4j API (1.2.0-SNAPSHOT) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |