Top Description Fields Constructors Methods
org.hibernate.dialect.sequence

public Class DB2iSequenceSupport

extends Object
implements SequenceSupport
Class Inheritance
All Implemented Interfaces
org.hibernate.dialect.sequence.SequenceSupport
Imports
org.hibernate.MappingException

Sequence support for org.hibernate.dialect.DB2iDialect.
Author
Christian Beikov

Field Summary

Modifier and TypeField and Description
public static final SequenceSupport

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getDropSequenceString(String
The name of the sequence
sequenceName
)

Overrides default org.hibernate.dialect.sequence.SequenceSupport.getDropSequenceString.

Typically dialects which support sequences can drop a sequence with a single command.
public String
getSelectSequenceNextValString(String
the name of the sequence
sequenceName
)

Implements org.hibernate.dialect.sequence.SequenceSupport.getSelectSequenceNextValString.

Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.
public String
getSelectSequencePreviousValString(String
the name of the sequence
sequenceName
)

Overrides default org.hibernate.dialect.sequence.SequenceSupport.getSelectSequencePreviousValString.

Generate the select expression fragment that will retrieve the previous value of a sequence as part of another (typically DML) statement.
public String
getSequenceNextValString(String
the name of the sequence
sequenceName
)

Overrides default org.hibernate.dialect.sequence.SequenceSupport.getSequenceNextValString.

Generate the appropriate select statement to to retrieve the next value of a sequence.
public String
getSequencePreviousValString(String
the name of the sequence
sequenceName
)

Overrides default org.hibernate.dialect.sequence.SequenceSupport.getSequencePreviousValString.

Generate the appropriate select statement to to retrieve the previous value of a sequence.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final SequenceSupport INSTANCE

Constructor Detail

DB2iSequenceSupportback to summary
public DB2iSequenceSupport()

Method Detail

getDropSequenceStringback to summary
public String getDropSequenceString(String sequenceName)

Overrides default org.hibernate.dialect.sequence.SequenceSupport.getDropSequenceString.

Doc from org.hibernate.dialect.sequence.SequenceSupport.getDropSequenceString.

Typically dialects which support sequences can drop a sequence with a single command. This is convenience form of getDropSequenceStrings to help facilitate that.

Dialects which support sequences and can drop a sequence in a single command need *only* override this method. Dialects which support sequences but require multiple commands to drop a sequence should instead override getDropSequenceStrings.

Parameters
sequenceName:String

The name of the sequence

Returns:String

The sequence drop commands

Annotations
@Override
getSelectSequenceNextValStringback to summary
public String getSelectSequenceNextValString(String sequenceName)

Implements org.hibernate.dialect.sequence.SequenceSupport.getSelectSequenceNextValString.

Doc from org.hibernate.dialect.sequence.SequenceSupport.getSelectSequenceNextValString.

Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.

This differs from getSequenceNextValString(String) in that it must return an expression usable within another statement.

Parameters
sequenceName:String

the name of the sequence

Returns:String

The "next value" fragment.

Annotations
@Override
getSelectSequencePreviousValStringback to summary
public String getSelectSequencePreviousValString(String sequenceName) throws MappingException

Overrides default org.hibernate.dialect.sequence.SequenceSupport.getSelectSequencePreviousValString.

Doc from org.hibernate.dialect.sequence.SequenceSupport.getSelectSequencePreviousValString.

Generate the select expression fragment that will retrieve the previous value of a sequence as part of another (typically DML) statement.

This differs from getSequencePreviousValString(String) in that it must return an expression usable within another statement.

Parameters
sequenceName:String

the name of the sequence

Returns:String

The "previous value" fragment.

Annotations
@Override
Exceptions
MappingException:
If sequences are not supported.
getSequenceNextValStringback to summary
public String getSequenceNextValString(String sequenceName)

Overrides default org.hibernate.dialect.sequence.SequenceSupport.getSequenceNextValString.

Doc from org.hibernate.dialect.sequence.SequenceSupport.getSequenceNextValString.

Generate the appropriate select statement to to retrieve the next value of a sequence.

This should be a stand alone select statement.

Parameters
sequenceName:String

the name of the sequence

Returns:String

String The select "next value" statement.

Annotations
@Override
getSequencePreviousValStringback to summary
public String getSequencePreviousValString(String sequenceName) throws MappingException

Overrides default org.hibernate.dialect.sequence.SequenceSupport.getSequencePreviousValString.

Doc from org.hibernate.dialect.sequence.SequenceSupport.getSequencePreviousValString.

Generate the appropriate select statement to to retrieve the previous value of a sequence.

This should be a stand alone select statement.

Parameters
sequenceName:String

the name of the sequence

Returns:String

String The select "previous value" statement.

Annotations
@Override
Exceptions
MappingException:
If sequences are not supported.