public class

DialectFactory

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

Class Overview

A factory for generating Dialect instances.

Summary

Public Constructors
DialectFactory()
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DialectFactory ()

Public Methods

public static Dialect buildDialect (Properties properties)

public static Dialect buildDialect (Properties properties, Connection connection)

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.

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.