Class DB2SequenceSupport
java.lang.Object
org.hibernate.dialect.sequence.spi.ANSISequenceSupport
org.hibernate.dialect.sequence.spi.DB2SequenceSupport
- All Implemented Interfaces:
SequenceSupport
Db2/Derby family base using ANSI value expressions, values stand-alone
selection, and restrictive sequence drop syntax.
Extend this class for a family member which retains those common rules and override only its differing DDL or value-selection methods.
- Since:
- 8.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDropSequenceString(String sequenceName) Render the single command which drops a sequence.getSelectSequencePreviousValString(String sequenceName) Render the expression which obtains the previous value inside another SQL statement.getSequenceNextValString(String sequenceName) Render a stand-alone statement which obtains the next sequence value.getSequencePreviousValString(String sequenceName) Render a stand-alone statement which obtains the previous sequence value.Methods inherited from class ANSISequenceSupport
getSelectSequenceNextValStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SequenceSupport
getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getDropSequenceStrings, getFromDual, getRestartSequenceString, getSequenceNextValString, sometimesNeedsStartingValue, startingValue, supportsPooledSequences, supportsSequences
-
Constructor Details
-
DB2SequenceSupport
-
-
Method Details
-
getSequenceNextValString
Description copied from interface:SequenceSupportRender a stand-alone statement which obtains the next sequence value.- Parameters:
sequenceName- the qualified sequence name- Returns:
- the next-value statement
-
getSelectSequencePreviousValString
Description copied from interface:SequenceSupportRender the expression which obtains the previous value inside another SQL statement. Override this method only when the database exposes such an expression.- Specified by:
getSelectSequencePreviousValStringin interfaceSequenceSupport- Overrides:
getSelectSequencePreviousValStringin classANSISequenceSupport- Parameters:
sequenceName- the qualified sequence name- Returns:
- the previous-value expression
- Throws:
MappingException- when the operation is unsupported
-
getSequencePreviousValString
Description copied from interface:SequenceSupportRender a stand-alone statement which obtains the previous sequence value.- Parameters:
sequenceName- the qualified sequence name- Returns:
- the previous-value statement
-
getDropSequenceString
Description copied from interface:SequenceSupportRender the single command which drops a sequence. Override the multi-command form instead when one logical drop requires several commands.- Parameters:
sequenceName- the qualified sequence name- Returns:
- the sequence-drop command
-