Package org.hibernate.dialect.resolver
Class DialectFactory
java.lang.Object
org.hibernate.dialect.resolver.DialectFactory
A factory for generating Dialect instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DialectbuildDialect(Properties properties) static DialectbuildDialect(Properties properties, Connection connection) Builds an appropriate Dialect instance.static DialectconstructDialect(String dialectName) Returns a dialect instance given the name of the class to use.
-
Constructor Details
-
DialectFactory
public DialectFactory()
-
-
Method Details
-
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
-
constructDialect
Returns a dialect instance given the name of the class to use.- Parameters:
dialectName- The name of the dialect class.- Returns:
- The dialect instance.
-