Class NextvalSequenceSupport

java.lang.Object
org.hibernate.dialect.sequence.spi.NextvalSequenceSupport
All Implemented Interfaces:
SequenceSupport

@SPI({USE,IMPLEMENT}) public class NextvalSequenceSupport extends Object implements SequenceSupport

Standard family base for databases using sequence.nextval and sequence.currval expressions.

Extend this class only when both expression forms match the database, and override the surrounding select or DDL grammar where necessary.

Since:
8.0
  • Constructor Details

    • NextvalSequenceSupport

      @SPI(IMPLEMENT) public NextvalSequenceSupport()
      Create a nextval-family strategy or provider subclass.
  • Method Details

    • getSelectSequenceNextValString

      public final String getSelectSequenceNextValString(String sequenceName)
      Description copied from interface: SequenceSupport
      Render the expression which obtains the next value inside another SQL statement. Do not include a surrounding select statement.
      Specified by:
      getSelectSequenceNextValString in interface SequenceSupport
      Parameters:
      sequenceName - the qualified sequence name
      Returns:
      the next-value expression
    • getSelectSequencePreviousValString

      public final String getSelectSequencePreviousValString(String sequenceName)
      Description copied from interface: SequenceSupport
      Render the expression which obtains the previous value inside another SQL statement. Override this method only when the database exposes such an expression.
      Specified by:
      getSelectSequencePreviousValString in interface SequenceSupport
      Parameters:
      sequenceName - the qualified sequence name
      Returns:
      the previous-value expression