Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » dialect » [javadoc | source]
org.hibernate.dialect
public class: DialectFactory [javadoc | source]
java.lang.Object
   org.hibernate.dialect.DialectFactory
A factory for generating Dialect instances.
Nested Class Summary:
public static interface  DialectFactory.DatabaseDialectMapper  For a given database product name, instances of DatabaseDialectMapper know which Dialect to use for different versions. 
public static class  DialectFactory.VersionInsensitiveMapper  A simple DatabaseDialectMapper for dialects which are independent of the underlying database product version. 
Method from org.hibernate.dialect.DialectFactory Summary:
buildDialect,   buildDialect,   determineDialect
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.dialect.DialectFactory Detail:
 public static Dialect buildDialect(String dialectName) 
    Returns a dialect instance given the name of the class to use.
 public static Dialect buildDialect(Properties props,
    String databaseName,
    int databaseMajorVersion) throws HibernateException 
    Builds an appropriate Dialect instance.

    If a dialect is explicitly named in the incoming properties, it is used. Otherwise, the database name and version (obtained from connection metadata) are used to make the dertemination.

    An exception is thrown if a dialect was not explicitly set and the database name is not known.

 public static Dialect determineDialect(String databaseName,
    int databaseMajorVersion) 
    Determine the appropriate Dialect to use given the database product name and major version.