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

public abstract Class AbstractDialectResolver

extends Object
implements DialectResolver
Class Inheritance
All Implemented Interfaces
org.hibernate.dialect.resolver.DialectResolver
Known Direct Subclasses
org.hibernate.dialect.resolver.BasicDialectResolver, org.hibernate.dialect.resolver.StandardDialectResolver
Imports
java.sql.DatabaseMetaData, .SQLException, org.slf4j.Logger, .LoggerFactory, org.hibernate.dialect.Dialect, org.hibernate.exception.JDBCConnectionException, org.hibernate.JDBCException

A templated resolver impl which delegates to the resolveDialectInternal method and handles any thrown SQLExceptions.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final Dialect
resolveDialect(DatabaseMetaData
The JDBC metadata.
metaData
)

Implements org.hibernate.dialect.resolver.DialectResolver.resolveDialect.

Determine the Dialect to use based on the given JDBC DatabaseMetaData.
protected abstract Dialect

Returns:

The resolved dialect, or null if we could not resolve.
resolveDialectInternal
(DatabaseMetaData
The database metadata
metaData
)

Perform the actual resolution without caring about handling SQLExceptions.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private static final Logger log

Constructor Detail

AbstractDialectResolverback to summary
public AbstractDialectResolver()

Method Detail

resolveDialectback to summary
public final Dialect resolveDialect(DatabaseMetaData metaData)

Implements org.hibernate.dialect.resolver.DialectResolver.resolveDialect.

Doc from org.hibernate.dialect.resolver.DialectResolver.resolveDialect.

Determine the Dialect to use based on the given JDBC DatabaseMetaData. Implementations are expected to return the Dialect instance to use, or null if the DatabaseMetaData does not match the criteria handled by this impl.

Here we template the resolution, delegating to resolveDialectInternal and handling java.sql.SQLExceptions properly.

Parameters
metaData:DatabaseMetaData

The JDBC metadata.

Returns:Dialect

The dialect to use, or null.

resolveDialectInternalback to summary
protected abstract Dialect resolveDialectInternal(DatabaseMetaData metaData) throws SQLException

Perform the actual resolution without caring about handling SQLExceptions.

Parameters
metaData:DatabaseMetaData

The database metadata

Returns:Dialect

The resolved dialect, or null if we could not resolve.

Exceptions
SQLException:
Indicates problems accessing the metadata.