public abstract class AbstractDialectResolver extends Object implements DialectResolver
resolveDialectInternal(java.sql.DatabaseMetaData)
method
and handles any thrown SQL errors
.Constructor and Description |
---|
AbstractDialectResolver() |
Modifier and Type | Method and Description |
---|---|
Dialect |
resolveDialect(DatabaseMetaData metaData)
Determine the
Dialect to use based on the given JDBC DatabaseMetaData . |
protected abstract Dialect |
resolveDialectInternal(DatabaseMetaData metaData)
Perform the actual resolution without caring about handling
SQLException s. |
public final Dialect resolveDialect(DatabaseMetaData metaData)
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(java.sql.DatabaseMetaData)
and handling
SQLException
s properly.resolveDialect
in interface DialectResolver
metaData
- The JDBC metadata.protected abstract Dialect resolveDialectInternal(DatabaseMetaData metaData) throws SQLException
SQLException
s.metaData
- The database metadataSQLException
- Indicates problems accessing the metadata.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.