org.hibernate.service.jdbc.dialect.internal
Class DialectResolverSet

java.lang.Object
  extended by org.hibernate.service.jdbc.dialect.internal.DialectResolverSet
All Implemented Interfaces:
Serializable, DialectResolver, Service

public class DialectResolverSet
extends Object
implements DialectResolver

A DialectResolver implementation which coordinates resolution by delegating to sub-resolvers.

See Also:
Serialized Form

Constructor Summary
DialectResolverSet()
           
DialectResolverSet(DialectResolver... resolvers)
           
DialectResolverSet(List<DialectResolver> resolvers)
           
 
Method Summary
 void addResolver(DialectResolver resolver)
          Add a resolver at the end of the underlying resolver list.
 void addResolverAtFirst(DialectResolver resolver)
          Add a resolver at the beginning of the underlying resolver list.
 Dialect resolveDialect(DatabaseMetaData metaData)
          Determine the Dialect to use based on the given JDBC DatabaseMetaData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialectResolverSet

public DialectResolverSet()

DialectResolverSet

public DialectResolverSet(List<DialectResolver> resolvers)

DialectResolverSet

public DialectResolverSet(DialectResolver... resolvers)
Method Detail

resolveDialect

public Dialect resolveDialect(DatabaseMetaData metaData)
                       throws JDBCConnectionException
Description copied from interface: DialectResolver
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.

Specified by:
resolveDialect in interface DialectResolver
Parameters:
metaData - The JDBC metadata.
Returns:
The dialect to use, or null.
Throws:
JDBCConnectionException - Indicates a 'non transient connection problem', which indicates that we should stop resolution attempts.

addResolver

public void addResolver(DialectResolver resolver)
Add a resolver at the end of the underlying resolver list. The resolver added by this method is at lower priority than any other existing resolvers.

Parameters:
resolver - The resolver to add.

addResolverAtFirst

public void addResolverAtFirst(DialectResolver resolver)
Add a resolver at the beginning of the underlying resolver list. The resolver added by this method is at higher priority than any other existing resolvers.

Parameters:
resolver - The resolver to add.


Copyright © 2001-2013 Red Hat, Inc. All Rights Reserved.