本文整理汇总了Java中org.hibernate.dialect.DerbyDialect类的典型用法代码示例。如果您正苦于以下问题:Java DerbyDialect类的具体用法?Java DerbyDialect怎么用?Java DerbyDialect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DerbyDialect类属于org.hibernate.dialect包,在下文中一共展示了DerbyDialect类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onShutdown
import org.hibernate.dialect.DerbyDialect; //导入依赖的package包/类
@Override
protected void onShutdown(ApplicationEvent event)
{
// Shut down DB, if required
Class<?> dialectClazz = this.dialect.getClass();
if (dialectClazz.equals(DerbyDialect.class))
{
try
{
DriverManager.getConnection("jdbc:derby:;shutdown=true");
}
// Derby shutdown always triggers an exception, even when clean
catch (Throwable e)
{
}
}
}
示例2: determineDatabaseDialectClass
import org.hibernate.dialect.DerbyDialect; //导入依赖的package包/类
/**
* Determine the Hibernate database dialect class for the given target database.
* @param database the target database
* @return the Hibernate database dialect class, or {@code null} if none found
*/
@SuppressWarnings("deprecation")
protected Class<?> determineDatabaseDialectClass(Database database) {
switch (database) {
case DB2: return DB2Dialect.class;
case DERBY: return DerbyDialect.class; // DerbyDialect deprecated in 4.x
case H2: return H2Dialect.class;
case HSQL: return HSQLDialect.class;
case INFORMIX: return InformixDialect.class;
case MYSQL: return MySQLDialect.class;
case ORACLE: return Oracle9iDialect.class;
case POSTGRESQL: return PostgreSQLDialect.class; // PostgreSQLDialect deprecated in 4.x
case SQL_SERVER: return SQLServerDialect.class;
case SYBASE: return org.hibernate.dialect.SybaseDialect.class; // SybaseDialect deprecated in 3.6 but not 4.x
default: return null;
}
}
示例3: determineDatabaseDialectClass
import org.hibernate.dialect.DerbyDialect; //导入依赖的package包/类
/**
* Determine the Hibernate database dialect class for the given target database.
* @param database the target database
* @return the Hibernate database dialect class, or {@code null} if none found
*/
protected Class determineDatabaseDialectClass(Database database) {
switch (database) {
case DB2: return DB2Dialect.class;
case DERBY: return DerbyDialect.class;
case H2: return H2Dialect.class;
case HSQL: return HSQLDialect.class;
case INFORMIX: return InformixDialect.class;
case MYSQL: return MySQLDialect.class;
case ORACLE: return Oracle9iDialect.class;
case POSTGRESQL: return PostgreSQLDialect.class;
case SQL_SERVER: return SQLServerDialect.class;
case SYBASE: return SybaseDialect.class;
default: return null;
}
}
示例4: allowsPhysicalColumnNameInHaving
import org.hibernate.dialect.DerbyDialect; //导入依赖的package包/类
/**
* Does the db/dialect support using a column's physical name in the having clause
* even after it has been aliased in the select/group-by clause. This is not actually
* required by the SQL spec, although virtually ever DB in the world supports this.
*
* @param testDescription description of the scenario being tested.
* @return true if is allowed
*/
protected boolean allowsPhysicalColumnNameInHaving(String testDescription) {
// I only *know* of this being a limitation on Derby, although I highly suspect
// it is a limitation on any IBM/DB2 variant
if ( DerbyDialect.class.isInstance( getDialect() ) ) {
// https://issues.apache.org/jira/browse/DERBY-1624
reportSkip( "Dialect does not support physical column name in having clause after it is aliased", testDescription );
return false;
}
return true;
}
示例5: createHibernateDialect
import org.hibernate.dialect.DerbyDialect; //导入依赖的package包/类
@Override
protected Dialect createHibernateDialect() {
return new DerbyDialect();
}