Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.dialect.resolver
Class DialectFactory

    java.lang.Object
      org.hibernate.dialect.resolver.DialectFactory

    public class DialectFactory

extends Object

A factory for generating Dialect instances.

Author:
  Steve Ebersole, Tomoto Shimizu Washio

Constructor Summary
`DialectFactory()`

Method Summary
`static Dialect` | `buildDialect(Properties properties)`
`static Dialect` | `buildDialect(Properties properties, Connection connection)` Builds an appropriate Dialect instance.
`static Dialect` | `constructDialect(String dialectName)` Returns a dialect instance given the name of the class to use.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DialectFactory

    public DialectFactory()

Method Detail

### buildDialect

    public static Dialect buildDialect(Properties properties,
                                       Connection connection)
                                throws HibernateException

  Builds an appropriate Dialect instance.

  If a dialect is explicitly named in the incoming properties, it is 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.

  Parameters:
    `properties` - The configuration properties.
    `connection` - The configured connection.
  Returns:
    The appropriate dialect instance.
  Throws:
    `HibernateException` - No dialect specified and no resolver could make the determination.

### buildDialect

    public static Dialect buildDialect(Properties properties)

### constructDialect

    public static Dialect constructDialect(String dialectName)

  Returns a dialect instance given the name of the class to use.

  Parameters:
    `dialectName` - The name of the dialect class.
  Returns:
    The dialect instance.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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