Class CurrentSequenceValueExpression

java.lang.Object
org.fastnate.generator.statements.SequenceValueExpression
org.fastnate.generator.statements.CurrentSequenceValueExpression
All Implemented Interfaces:
ColumnExpression

public class CurrentSequenceValueExpression extends SequenceValueExpression
A ColumnExpression which references an ID using the current value of a sequence.
Author:
Tobias Liefke
  • 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 sequence
      difference - the difference of the referenced ID to the sequence value
      firstCall - indicates, that this is the first call to the sequence in this session
  • Method Details

    • toSql

      public String toSql()
      Description copied from interface: ColumnExpression
      Generates the SQL for this expression.
      Returns:
      the SQL string