Top Description Inners Fields Constructors Methods
org.hibernate.dialect

public Class Teradata14Dialect

extends TeradataDialect
Class Inheritance
Imports
java.sql.CallableStatement, .ResultSet, .SQLException, .Types, java.util.Iterator, .Map, org.hibernate.HibernateException, .LockOptions, org.hibernate.boot.Metadata, org.hibernate.boot.model.relational.QualifiedNameImpl, .SqlStringGenerationContext, org.hibernate.cfg.Environment, org.hibernate.dialect.function.SQLFunctionTemplate, org.hibernate.dialect.identity.IdentityColumnSupport, .Teradata14IdentityColumnSupport, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment, org.hibernate.engine.spi.QueryParameters, org.hibernate.exception.spi.TemplatedViolatedConstraintNameExtracter, .ViolatedConstraintNameExtracter, org.hibernate.mapping.Column, .Index, org.hibernate.sql.ForUpdateFragment, org.hibernate.tool.schema.internal.StandardIndexExporter, org.hibernate.tool.schema.spi.Exporter, org.hibernate.type.StandardBasicTypes

A dialect for the Teradata database

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static ViolatedConstraintNameExtracter
pack-priv StandardIndexExporter
TeraIndexExporter

Constructor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
applyLocksToSql(String
the SQL string to modify
sql
,
LockOptions
lock options indexed by aliased table names.
aliasedLockOptions
,
Map<K, V>
a map of key columns indexed by aliased table names.
keyColumnNames
)

Overrides org.hibernate.dialect.Dialect.applyLocksToSql.

Modifies the given SQL by applying the appropriate updates for the specified lock modes and key columns.
public boolean
public String
getAddColumnString()

Overrides org.hibernate.dialect.TeradataDialect.getAddColumnString.

The syntax used to add a column to a table (optional).
public IdentityColumnSupport
public Exporter<Index>
public String
getReadLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.Dialect.getReadLockString.

Get the string to append to SELECT statements to acquire READ locks for this dialect.
public ResultSet
getResultSet(CallableStatement
The callable statement.
cs
)

Overrides org.hibernate.dialect.Dialect.getResultSet.

Given a callable statement previously processed by registerResultSetOutParameter, extract the ResultSet from the OUT parameter.
public String

Returns:

the database type name
getTypeName
(int
java.sql.Types typecode
code
,
int
the length or precision of the column
length
,
int
the precision of the column
precision
,
int
the scale of the column
scale
)

Overrides org.hibernate.dialect.TeradataDialect.getTypeName.

Get the name of the database type associated with the given java.sql.Types typecode.
public ViolatedConstraintNameExtracter
public String
getWriteLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.Dialect.getWriteLockString.

Get the string to append to SELECT statements to acquire WRITE locks for this dialect.
public int
registerResultSetOutParameter(CallableStatement
The callable statement.
statement
,
int
The bind position at which to register the output param.
col
)

Overrides org.hibernate.dialect.Dialect.registerResultSetOutParameter.

Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by position*.
public boolean
supportsExistsInSelect()

Overrides org.hibernate.dialect.Dialect.supportsExistsInSelect.

Does the dialect support an exists statement in the select clause?
public boolean
supportsExpectedLobUsagePattern()

Overrides org.hibernate.dialect.Dialect.supportsExpectedLobUsagePattern.

Expected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes...
public boolean
supportsLockTimeouts()

Overrides org.hibernate.dialect.Dialect.supportsLockTimeouts.

Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.
public boolean
supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Does this dialect support `count(distinct a,b)`?
public boolean
supportsUnboundedLobLocatorMaterialization()

Overrides org.hibernate.dialect.Dialect.supportsUnboundedLobLocatorMaterialization.

Is it supported to materialize a LOB locator outside the transaction in which it was created?
public boolean
useFollowOnLocking(QueryParameters
query parameters
parameters
)

Overrides org.hibernate.dialect.Dialect.useFollowOnLocking.

Some dialects have trouble applying pessimistic locking depending upon what other query options are specified (paging, ordering, etc).
Inherited from org.hibernate.dialect.TeradataDialect:
doesReadCommittedCauseWritersToBlockReadersdoesRepeatableReadCauseReadersToBlockWritersgenerateIdTableNamegetCreateIdTableCommandgetCreateIdTableStatementOptionsgetCreateMultisetTableStringgetDefaultMultiTableBulkIdStrategygetDropIdTableCommandgetForUpdateStringgetInExpressionCountLimitgetSelectClauseNullStringgetTruncateIdTableCommandsupportsBindAsCallableArgumentsupportsCascadeDeletesupportsCircularCascadeDeleteConstraintssupportsEmptyInListsupportsLobValueChangePropogationsupportsSequences

Field Detail

EXTRACTERback to summary
private static ViolatedConstraintNameExtracter EXTRACTER

Hides org.hibernate.dialect.Dialect.EXTRACTER.

TeraIndexExporterback to summary
pack-priv StandardIndexExporter TeraIndexExporter

Constructor

Constructor Detail

Teradata14Dialectback to summary
public Teradata14Dialect()

Method Detail

applyLocksToSqlback to summary
public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<K, V> keyColumnNames)

Overrides org.hibernate.dialect.Dialect.applyLocksToSql.

Doc from org.hibernate.dialect.Dialect.applyLocksToSql.

Modifies the given SQL by applying the appropriate updates for the specified lock modes and key columns.

The behavior here is that of an ANSI SQL SELECT FOR UPDATE. This method is really intended to allow dialects which do not support SELECT FOR UPDATE to achieve this in their own fashion.

Parameters
sql:String

the SQL string to modify

aliasedLockOptions:LockOptions

lock options indexed by aliased table names.

keyColumnNames:Map<K, V>

a map of key columns indexed by aliased table names.

Returns:String

the modified SQL string.

Annotations
@Override
areStringComparisonsCaseInsensitiveback to summary
public boolean areStringComparisonsCaseInsensitive()

Overrides org.hibernate.dialect.TeradataDialect.areStringComparisonsCaseInsensitive.

Doc from org.hibernate.dialect.Dialect.areStringComparisonsCaseInsensitive.

Are string comparisons implicitly case insensitive.

In other words, does [where 'XYZ' = 'xyz'] resolve to true?

Returns:boolean

True if comparisons are case insensitive.

Annotations
@Override
getAddColumnStringback to summary
public String getAddColumnString()

Overrides org.hibernate.dialect.TeradataDialect.getAddColumnString.

Doc from org.hibernate.dialect.Dialect.getAddColumnString.

The syntax used to add a column to a table (optional).

Returns:String

The "add column" fragment.

Annotations
@Override
getIdentityColumnSupportback to summary
public IdentityColumnSupport getIdentityColumnSupport()

Overrides org.hibernate.dialect.Dialect.getIdentityColumnSupport.

Doc from org.hibernate.dialect.Dialect.getIdentityColumnSupport.

Get the appropriate IdentityColumnSupport

Returns:IdentityColumnSupport

the IdentityColumnSupport

Annotations
@Override
getIndexExporterback to summary
public Exporter<Index> getIndexExporter()

Overrides org.hibernate.dialect.Dialect.getIndexExporter.

Annotations
@Override
getReadLockStringback to summary
public String getReadLockString(int timeout)

Overrides org.hibernate.dialect.Dialect.getReadLockString.

Doc from org.hibernate.dialect.Dialect.getReadLockString.

Get the string to append to SELECT statements to acquire READ locks for this dialect. Location of the returned string is treated the same as getForUpdateString.

Parameters
timeout:int

in milliseconds, -1 for indefinite wait and 0 for no wait.

Returns:String

The appropriate LOCK clause string.

Annotations
@Override
getResultSetback to summary
public ResultSet getResultSet(CallableStatement cs) throws SQLException

Overrides org.hibernate.dialect.Dialect.getResultSet.

Doc from org.hibernate.dialect.Dialect.getResultSet.

Given a callable statement previously processed by registerResultSetOutParameter, extract the ResultSet from the OUT parameter.

Parameters
cs:CallableStatement

The callable statement.

Returns:ResultSet

The extracted result set.

Annotations
@Override
Exceptions
SQLException:
Indicates problems extracting the result set.
getTypeNameback to summary
public String getTypeName(int code, int length, int precision, int scale) throws HibernateException

Overrides org.hibernate.dialect.TeradataDialect.getTypeName.

Get the name of the database type associated with the given java.sql.Types typecode.

Parameters
code:int

java.sql.Types typecode

length:int

the length or precision of the column

precision:int

the precision of the column

scale:int

the scale of the column

Returns:String

the database type name

getViolatedConstraintNameExtracterback to summary
public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()

Overrides org.hibernate.dialect.Dialect.getViolatedConstraintNameExtracter.

Implements org.hibernate.exception.spi.ConversionContext.getViolatedConstraintNameExtracter.

Annotations
@Override
getWriteLockStringback to summary
public String getWriteLockString(int timeout)

Overrides org.hibernate.dialect.Dialect.getWriteLockString.

Doc from org.hibernate.dialect.Dialect.getWriteLockString.

Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the returned string is treated the same as getForUpdateString.

Parameters
timeout:int

in milliseconds, -1 for indefinite wait and 0 for no wait.

Returns:String

The appropriate LOCK clause string.

Annotations
@Override
registerResultSetOutParameterback to summary
public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException

Overrides org.hibernate.dialect.Dialect.registerResultSetOutParameter.

Doc from org.hibernate.dialect.Dialect.registerResultSetOutParameter.

Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by position*. Pre-Java 8, registering such ResultSet-returning parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.

Parameters
statement:CallableStatement

The callable statement.

col:int

The bind position at which to register the output param.

Returns:int

The number of (contiguous) bind positions used.

Annotations
@Override
Exceptions
SQLException:
Indicates problems registering the param.
supportsExistsInSelectback to summary
public boolean supportsExistsInSelect()

Overrides org.hibernate.dialect.Dialect.supportsExistsInSelect.

Doc from org.hibernate.dialect.Dialect.supportsExistsInSelect.

Does the dialect support an exists statement in the select clause?

Returns:boolean

True if exists checks are allowed in the select clause; false otherwise.

Annotations
@Override
supportsExpectedLobUsagePatternback to summary
public boolean supportsExpectedLobUsagePattern()

Overrides org.hibernate.dialect.Dialect.supportsExpectedLobUsagePattern.

Doc from org.hibernate.dialect.Dialect.supportsExpectedLobUsagePattern.

Expected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes...

Part of the trickiness here is the fact that this is largely driver dependent. For example, Oracle (which is notoriously bad with LOB support in their drivers historically) actually does a pretty good job with LOB support as of the 10.2.x versions of their drivers...

Returns:boolean

True if normal LOB usage patterns can be used with this driver; false if driver-specific hookiness needs to be applied.

Annotations
@Override
supportsLockTimeoutsback to summary
public boolean supportsLockTimeouts()

Overrides org.hibernate.dialect.Dialect.supportsLockTimeouts.

Doc from org.hibernate.dialect.Dialect.supportsLockTimeouts.

Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.

Returns:boolean

True is this dialect supports specifying lock timeouts.

Annotations
@Override
supportsTupleDistinctCountsback to summary
public boolean supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Doc from org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Does this dialect support `count(distinct a,b)`?

Returns:boolean

True if the database supports counting distinct tuples; false otherwise.

Annotations
@Override
supportsUnboundedLobLocatorMaterializationback to summary
public boolean supportsUnboundedLobLocatorMaterialization()

Overrides org.hibernate.dialect.Dialect.supportsUnboundedLobLocatorMaterialization.

Doc from org.hibernate.dialect.Dialect.supportsUnboundedLobLocatorMaterialization.

Is it supported to materialize a LOB locator outside the transaction in which it was created?

Again, part of the trickiness here is the fact that this is largely driver dependent.

Note

all database I have tested which supportsExpectedLobUsagePattern() also support the ability to materialize a LOB outside the owning transaction...

Returns:boolean

True if unbounded materialization is supported; false otherwise.

Annotations
@Override
useFollowOnLockingback to summary
public boolean useFollowOnLocking(QueryParameters parameters)

Overrides org.hibernate.dialect.Dialect.useFollowOnLocking.

Doc from org.hibernate.dialect.Dialect.useFollowOnLocking.

Some dialects have trouble applying pessimistic locking depending upon what other query options are specified (paging, ordering, etc). This method allows these dialects to request that locking be applied by subsequent selects.

Parameters
parameters:QueryParameters

query parameters

Returns:boolean

true indicates that the dialect requests that locking be applied by subsequent select; false (the default) indicates that locking should be applied to the main SQL statement..

Annotations
@Override
org.hibernate.dialect back to summary

private Class Teradata14Dialect.TeradataIndexExporter

extends StandardIndexExporter
implements Exporter<Index>
Class Inheritance
All Implemented Interfaces
org.hibernate.tool.schema.spi.Exporter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String[]
getSqlCreateStrings(Index index, Metadata metadata, SqlStringGenerationContext context)

Overrides org.hibernate.tool.schema.internal.StandardIndexExporter.getSqlCreateStrings.

Overrides default org.hibernate.tool.schema.spi.Exporter.getSqlCreateStrings.

Deprecated as a consequence of Index being deprecated.
Get the commands needed for creation.
Inherited from org.hibernate.tool.schema.internal.StandardIndexExporter:
getSqlDropStrings

Constructor Detail

TeradataIndexExporterback to summary
public TeradataIndexExporter(Dialect dialect)

Method Detail

getSqlCreateStringsback to summary
public String[] getSqlCreateStrings(Index index, Metadata metadata, SqlStringGenerationContext context)

Overrides org.hibernate.tool.schema.internal.StandardIndexExporter.getSqlCreateStrings.

Overrides default org.hibernate.tool.schema.spi.Exporter.getSqlCreateStrings.

Doc from org.hibernate.tool.schema.spi.Exporter.getSqlCreateStrings.

Deprecated

as a consequence of Index being deprecated. See corresponding docs for further information.

Get the commands needed for creation.

Returns:String[]

The commands needed for creation scripting.

Annotations
@Override