|
Cumulus4j API (1.0.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.store.model.Sequence
public class Sequence
Persistent sequence entity used by Cumulus4jIncrementGenerator
.
Constructor Summary | |
---|---|
protected |
Sequence()
Default constructor. |
protected |
Sequence(String sequenceName)
Constructor creating a Sequence with the given primary key. |
Method Summary | |
---|---|
static Sequence |
createSequence(PersistenceManager pm,
String sequenceName)
Get the Sequence identified by the given sequenceName . |
long |
getNextValue()
Get the next value (i.e. |
static Sequence |
getSequence(PersistenceManager pm,
String sequenceName)
Get the Sequence identified by the given sequenceName . |
String |
getSequenceName()
Get the name of the sequence. |
void |
setNextValue(long nextValue)
Set the next value (i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Sequence()
protected Sequence(String sequenceName)
Sequence
with the given primary key.
sequenceName
- the name of the sequence; must not be null
.Method Detail |
---|
public static Sequence getSequence(PersistenceManager pm, String sequenceName)
Sequence
identified by the given sequenceName
.
If no such Sequence
exists, this method returns null
.
pm
- the backend-PersistenceManager
used to access the underlying datastore; must not be null
.sequenceName
- the name of the sequence; must not be null
.
Sequence
identified by the given sequenceName
or null
, if no such
Sequence
exists.public static Sequence createSequence(PersistenceManager pm, String sequenceName)
Sequence
identified by the given sequenceName
.
If no such Sequence
exists, this method creates & persists one.
pm
- the backend-PersistenceManager
used to access the underlying datastore; must not be null
.sequenceName
- the name of the sequence; must not be null
.
Sequence
identified by the given sequenceName
; never null
.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.0.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |