站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

DialectFactory - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.core.hibernate
Class DialectFactory

java.lang.Object
  extended byorg.jboss.portal.core.hibernate.DialectFactory

public class DialectFactory
extends java.lang.Object

Ripped off hibernate 3.1 that is not in 3.0. A factory for generating Dialect instances.


Nested Class Summary
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.
 
Method Summary
static java.lang.String determineDialect(java.lang.String databaseName, int databaseMajorVersion)
          Determine the appropriate Dialect to use given the database product name and major version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

determineDialect

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

Parameters:
databaseName - The name of the database product (obtained from metadata).
databaseMajorVersion - The major version of the database product (obtained from metadata).
Returns:
An appropriate dialect instance.