public interface Sequences
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
long |
createNextValue(Sequence sequence)
Returns the next sequence value.
|
void |
deleteSequence(Sequence sequence)
Removes sequence with specified identifier
|
long |
getCurrentValue(Sequence sequence)
Returns the current value of the sequence.
|
void |
setCurrentValue(Sequence sequence,
long value)
Set current value for the sequence.
|
static final java.lang.String NAME
long createNextValue(Sequence sequence)
sequences.createNextValue(Sequence.withName("seq_name").setStartValue(10).setIncrement(1))
sequence
- sequence objectlong getCurrentValue(Sequence sequence)
createNextValue(Sequence)
must be called at least once beforehand.sequence
- object Sequence
void setCurrentValue(Sequence sequence, long value)
getCurrentValue(Sequence)
invocation will return value
Next createNextValue(Sequence)
invocation will return value + increment
sequence
- sequence object Sequence
value
- value