|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ninja_squad.dbsetup.generator.SequenceValueGenerator
public final class SequenceValueGenerator
A ValueGenerator which generates a sequence of long values. By default, the sequence starts at 1 and
increments by 1, but this can be customized. Instances of this class are created using
ValueGenerators.sequence().
| Method Summary | |
|---|---|
SequenceValueGenerator |
incrementingBy(int increment)
Increments the value by the given increment. |
java.lang.Long |
nextValue()
Called each time a new row is inserted, to get the value to insert in the column using this value generator. |
SequenceValueGenerator |
startingAt(long start)
Restarts the sequence at the given value |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public SequenceValueGenerator startingAt(long start)
start - the starting value of the created generator
public SequenceValueGenerator incrementingBy(int increment)
public java.lang.Long nextValue()
ValueGenerator
nextValue in interface ValueGenerator<java.lang.Long>public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||