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

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

public class DialectFactoryImpl
extends Object
implements DialectFactory

Standard implementation of the DialectFactory service.

See Also:
Serialized Form

Constructor Summary
DialectFactoryImpl()
           
 
Method Summary
 Dialect buildDialect(Map configValues, Connection connection)
          Builds an appropriate Dialect instance.
 void setClassLoaderService(ClassLoaderService classLoaderService)
           
 void setDialectResolver(DialectResolver dialectResolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialectFactoryImpl

public DialectFactoryImpl()
Method Detail

setClassLoaderService

public void setClassLoaderService(ClassLoaderService classLoaderService)

setDialectResolver

public void setDialectResolver(DialectResolver dialectResolver)

buildDialect

public Dialect buildDialect(Map configValues,
                            Connection connection)
                     throws HibernateException
Description copied from interface: DialectFactory
Builds an appropriate Dialect instance.

If a dialect is explicitly named in the incoming properties, it should used. Otherwise, it is determined by dialect resolvers based on the passed connection.

An exception is thrown if a dialect was not explicitly set and no resolver could make the determination from the given connection.

Specified by:
buildDialect in interface DialectFactory
Parameters:
configValues - The configuration properties.
connection - The configured connection.
Returns:
The appropriate dialect instance.
Throws:
HibernateException - No dialect specified and no resolver could make the determination.


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