Class CurrentSequenceValueExpression
java.lang.Object
org.fastnate.generator.statements.SequenceValueExpression
org.fastnate.generator.statements.CurrentSequenceValueExpression
- All Implemented Interfaces:
ColumnExpression
A
ColumnExpression which references an ID using the
current value of a sequence.- Author:
- Tobias Liefke
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCurrentSequenceValueExpression(SequenceIdGenerator sequence, long difference, boolean firstCall) Creates a new instance of an expression that references an ID by using the current value of a sequence. -
Method Summary
Methods inherited from class org.fastnate.generator.statements.SequenceValueExpression
getDifference, getSequence, toSqlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.fastnate.generator.statements.ColumnExpression
appendSql
-
Field Details
-
firstCall
private final boolean firstCall
-
-
Constructor Details
-
CurrentSequenceValueExpression
public CurrentSequenceValueExpression(SequenceIdGenerator sequence, long difference, boolean firstCall) Creates a new instance of an expression that references an ID by using the current value of a sequence.- Parameters:
sequence- describes the sequencedifference- the difference of the referenced ID to the sequence valuefirstCall- indicates, that this is the first call to the sequence in this session
-
-
Method Details
-
toSql
Description copied from interface:ColumnExpressionGenerates the SQL for this expression.- Returns:
- the SQL string
-