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

public Class NoSequenceSupport

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

An instance of SequenceSupport support indicating that the SQL dialect does not support sequences.
Author
Gavin King

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
getCreateSequenceString(String
The name of the sequence
sequenceName
)

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

Typically dialects which support sequences can create a sequence with a single command.
public String
getCreateSequenceString(String
The name of the sequence
sequenceName
,
int
The initial value to apply to 'create sequence' statement
initialValue
,
int
The increment value to apply to 'create sequence' statement
incrementSize
)

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

Typically dialects which support sequences can create a sequence with a single command.
public String[]
getCreateSequenceStrings(String
The name of the sequence
sequenceName
,
int
The initial value to apply to 'create sequence' statement
initialValue
,
int
The increment value to apply to 'create sequence' statement
incrementSize
)

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

An optional multi-line form for databases which supportsPooledSequences().
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[]
getDropSequenceStrings(String
The name of the sequence
sequenceName
)

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

The multiline script used to drop a sequence.
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
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
getSequenceNextValString(String
the name of the sequence
sequenceName
,
int
the increment, in case it needs to be passed explicitly
increment
)

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

Generate the appropriate select statement to to retrieve the next value of a sequence.
public boolean
supportsPooledSequences()

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

Does this dialect support "pooled" sequences.
public boolean
supportsSequences()

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

Does this dialect support sequences?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final SequenceSupport INSTANCE

Constructor Detail

NoSequenceSupportback to summary
public NoSequenceSupport()

Method Detail

getCreateSequenceStringback to summary
public String getCreateSequenceString(String sequenceName) throws MappingException

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

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

Typically dialects which support sequences can create a sequence with a single command. This method is a convenience making it easier to implement getCreateSequenceStrings(String, int, int) for these dialects.

The default definition is to return create sequence sequenceName for the argument sequenceName. Dialects need to override this method if a sequence created in this manner does not start at 1, or if the syntax is nonstandard.

Dialects which support sequences and can create a sequence in a single command need *only* override this method. Dialects which support sequences but require multiple commands to create a sequence should override getCreateSequenceStrings(String, int, int) instead.

Parameters
sequenceName:String

The name of the sequence

Returns:String

The sequence creation command

Annotations
@Override
Exceptions
MappingException:
If sequences are not supported.
getCreateSequenceStringback to summary
public String getCreateSequenceString(String sequenceName, int initialValue, int incrementSize) throws MappingException

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

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

Typically dialects which support sequences can create a sequence with a single command. This method is a convenience making it easier to implement getCreateSequenceStrings(String, int, int) for these dialects.

Overloaded form of getCreateSequenceString(String), additionally taking the initial value and increment size to be applied to the sequence definition.

The default definition is to suffix getCreateSequenceString(String) with the string: start with initialValue increment by incrementSize for the arguments initialValue and incrementSize. Dialects need to override this method if different key phrases are used to apply the allocation information.
Parameters
sequenceName:String

The name of the sequence

initialValue:int

The initial value to apply to 'create sequence' statement

incrementSize:int

The increment value to apply to 'create sequence' statement

Returns:String

The sequence creation command

Annotations
@Override
Exceptions
MappingException:
If sequences are not supported.
getCreateSequenceStringsback to summary
public String[] getCreateSequenceStrings(String sequenceName, int initialValue, int incrementSize) throws MappingException

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

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

An optional multi-line form for databases which supportsPooledSequences().

Parameters
sequenceName:String

The name of the sequence

initialValue:int

The initial value to apply to 'create sequence' statement

incrementSize:int

The increment value to apply to 'create sequence' statement

Returns:String[]

The sequence creation commands

Annotations
@Override
Exceptions
MappingException:
If sequences are not supported.
getDropSequenceStringback to summary
public String getDropSequenceString(String sequenceName) throws MappingException

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
Exceptions
MappingException:
If sequences are not supported.
getDropSequenceStringsback to summary
public String[] getDropSequenceStrings(String sequenceName) throws MappingException

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

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

The multiline script used to drop a sequence.

Parameters
sequenceName:String

The name of the sequence

Returns:String[]

The sequence drop commands

Annotations
@Override
Exceptions
MappingException:
If sequences are not supported.
getSelectSequenceNextValStringback to summary
public String getSelectSequenceNextValString(String sequenceName) throws MappingException

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
Exceptions
MappingException:
If sequences are not supported.
getSequenceNextValStringback to summary
public String getSequenceNextValString(String sequenceName) throws MappingException

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
Exceptions
MappingException:
If sequences are not supported.
getSequenceNextValStringback to summary
public String getSequenceNextValString(String sequenceName, int increment) throws MappingException

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

increment:int

the increment, in case it needs to be passed explicitly

Returns:String

String The select "next value" statement.

Annotations
@Override
Exceptions
MappingException:
If sequences are not supported.
supportsPooledSequencesback to summary
public boolean supportsPooledSequences()

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

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

Does this dialect support "pooled" sequences. Not aware of a better name for this. Essentially can we specify the initial and increment values?

Returns:boolean

True if such "pooled" sequences are supported; false otherwise.

Annotations
@Override
supportsSequencesback to summary
public boolean supportsSequences()

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

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

Does this dialect support sequences?

Returns:boolean

True if sequences supported; false otherwise.

Annotations
@Override