Top Description Inners Fields Constructors Methods
org.hibernate.dialect

public Class SQLServer2012Dialect

extends SQLServer2008Dialect
Class Inheritance
Known Direct Subclasses
org.hibernate.dialect.SQLServer2016Dialect
Imports
org.hibernate.boot.Metadata, org.hibernate.boot.model.relational.QualifiedSequenceName, .Sequence, .SqlStringGenerationContext, org.hibernate.dialect.pagination.LimitHandler, .SQLServer2012LimitHandler, org.hibernate.tool.schema.internal.StandardSequenceExporter, org.hibernate.tool.schema.spi.Exporter

Microsoft SQL Server 2012 Dialect
Author
Brett Meyer

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final Exporter<Sequence>

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

Typically dialects which support sequences can create a sequence with a single command.
protected LimitHandler
public String
getDropSequenceString(String
The name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getDropSequenceString.

Typically dialects which support sequences can drop a sequence with a single command.
public String
getQueryHintString(String
The query to which to apply the hint.
sql
,
String
The hints to apply
hints
)

Overrides org.hibernate.dialect.Dialect.getQueryHintString.

Apply a hint to the query.
public String
getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.
public String
getSelectSequenceNextValString(String
the name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getSelectSequenceNextValString.

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

Overrides org.hibernate.dialect.Dialect.getSequenceNextValString.

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

Overrides org.hibernate.dialect.SQLServerDialect.supportsLimitOffset.

Does this dialect's LIMIT support (if any) additionally support specifying an offset?
public boolean
supportsPooledSequences()

Overrides org.hibernate.dialect.Dialect.supportsPooledSequences.

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

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?
Inherited from org.hibernate.dialect.SQLServer2008Dialect:
renderOrderByElementsupportsValuesList

Field Detail

sequenceExporterback to summary
private final Exporter<Sequence> sequenceExporter

Hides org.hibernate.dialect.Dialect.sequenceExporter.

Constructor Detail

SQLServer2012Dialectback to summary
public SQLServer2012Dialect()

Method Detail

getCreateSequenceStringback to summary
public String getCreateSequenceString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

Doc from org.hibernate.dialect.Dialect.getCreateSequenceString.

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

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 instead override getCreateSequenceStrings.

Parameters
sequenceName:String

The name of the sequence

Returns:String

The sequence creation command

Annotations
@Override
getDefaultLimitHandlerback to summary
protected LimitHandler getDefaultLimitHandler()

Overrides org.hibernate.dialect.SQLServer2005Dialect.getDefaultLimitHandler.

Annotations
@Override
getDropSequenceStringback to summary
public String getDropSequenceString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getDropSequenceString.

Doc from org.hibernate.dialect.Dialect.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
getQueryHintStringback to summary
public String getQueryHintString(String sql, String hints)

Overrides org.hibernate.dialect.Dialect.getQueryHintString.

Doc from org.hibernate.dialect.Dialect.getQueryHintString.

Apply a hint to the query. The entire query is provided, allowing the Dialect full control over the placement and syntax of the hint. By default, ignore the hint and simply return the query.

Parameters
sql:String

The query to which to apply the hint.

hints:String

The hints to apply

Returns:String

The modified SQL

Annotations
@Override
getQuerySequencesStringback to summary
public String getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

Doc from org.hibernate.dialect.Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.

Returns:String

The select command; or null if sequences are not supported.

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

Overrides org.hibernate.dialect.Dialect.getSelectSequenceNextValString.

Doc from org.hibernate.dialect.Dialect.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 this should return an expression usable within another statement.

Parameters
sequenceName:String

the name of the sequence

Returns:String

The "nextval" fragment.

Annotations
@Override
getSequenceExporterback to summary
public Exporter<Sequence> getSequenceExporter()

Overrides org.hibernate.dialect.Dialect.getSequenceExporter.

Annotations
@Override
getSequenceNextValStringback to summary
public String getSequenceNextValString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getSequenceNextValString.

Doc from org.hibernate.dialect.Dialect.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 "nextval" select string.

Annotations
@Override
supportsLimitOffsetback to summary
public boolean supportsLimitOffset()

Overrides org.hibernate.dialect.SQLServerDialect.supportsLimitOffset.

Doc from org.hibernate.dialect.Dialect.supportsLimitOffset.

Does this dialect's LIMIT support (if any) additionally support specifying an offset?

Returns:boolean

True if the dialect supports an offset within the limit support.

Annotations
@Override
supportsPooledSequencesback to summary
public boolean supportsPooledSequences()

Overrides org.hibernate.dialect.Dialect.supportsPooledSequences.

Doc from org.hibernate.dialect.Dialect.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 org.hibernate.dialect.Dialect.supportsSequences.

Doc from org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?

Returns:boolean

True if sequences supported; false otherwise.

Annotations
@Override
org.hibernate.dialect back to summary

private Class SQLServer2012Dialect.SqlServerSequenceExporter

extends StandardSequenceExporter
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected String
Inherited from org.hibernate.tool.schema.internal.StandardSequenceExporter:
getSqlCreateStringsgetSqlDropStrings

Constructor Detail

SqlServerSequenceExporterback to summary
public SqlServerSequenceExporter(Dialect dialect)

Method Detail

getFormattedSequenceNameback to summary
protected String getFormattedSequenceName(QualifiedSequenceName name, Metadata metadata, SqlStringGenerationContext context)

Overrides org.hibernate.tool.schema.internal.StandardSequenceExporter.getFormattedSequenceName.

Annotations
@Override