Class ANSISequenceSupport

java.lang.Object
org.hibernate.dialect.sequence.spi.ANSISequenceSupport
All Implemented Interfaces:
SequenceSupport
Direct Known Subclasses:
DB2SequenceSupport

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

Standard family base for databases using the ANSI next value for expression and ordinary create/drop sequence grammar.

Extend this class only when the database retains the ANSI next-value expression. Override the non-final previous-value or DDL methods for the database-specific differences and delegate unchanged behavior to super.

Since:
8.0
  • Constructor Details

    • ANSISequenceSupport

      @SPI(IMPLEMENT) public ANSISequenceSupport()
      Create an ANSI sequence-support 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 String getSelectSequencePreviousValString(String sequenceName) throws MappingException
      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
      Throws:
      MappingException - when the operation is unsupported