public class DialectFactory extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
DialectFactory.DatabaseDialectMapper
For a given database product name, instances of
DatabaseDialectMapper know which Dialect to use for different versions.
|
static class |
DialectFactory.VersionInsensitiveMapper
A simple DatabaseDialectMapper for dialects which are independent
of the underlying database product version.
|
Constructor and Description |
---|
DialectFactory() |
Modifier and Type | Method and Description |
---|---|
static org.hibernate.dialect.Dialect |
buildDialect(Properties props,
String databaseName,
int databaseMajorVersion)
Builds an appropriate Dialect instance.
|
static org.hibernate.dialect.Dialect |
buildDialect(String dialectName)
Returns a dialect instance given the name of the class to use.
|
static org.hibernate.dialect.Dialect |
determineDialect(String databaseName,
int databaseMajorVersion)
Determine the appropriate Dialect to use given the database product name
and major version.
|
public static org.hibernate.dialect.Dialect buildDialect(Properties props, String databaseName, int databaseMajorVersion) throws org.hibernate.HibernateException
props
- The configuration properties.databaseName
- The name of the database product (obtained from metadata).databaseMajorVersion
- The major version of the database product (obtained from metadata).org.hibernate.HibernateException
- No dialect specified and database name not known.public static org.hibernate.dialect.Dialect determineDialect(String databaseName, int databaseMajorVersion)
databaseName
- The name of the database product (obtained from metadata).databaseMajorVersion
- The major version of the database product (obtained from metadata).public static org.hibernate.dialect.Dialect buildDialect(String dialectName)
dialectName
- The name of the dialect class.Copyright © 2005–2019 Alfresco Software. All rights reserved.