org.hibernate.dialect.DerbyDialect Java Examples

The following examples show how to use org.hibernate.dialect.DerbyDialect. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HibernateJpaVendorAdapter.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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 MySQL5Dialect.class;
		case ORACLE: return Oracle9iDialect.class;
		case POSTGRESQL: return PostgreSQLDialect.class;  // PostgreSQLDialect deprecated in 4.x
		case SQL_SERVER: return SQLServer2008Dialect.class;
		case SYBASE: return org.hibernate.dialect.SybaseDialect.class;  // SybaseDialect deprecated in 3.6 but not 4.x
		default: return null;
	}
}
 
Example #2
Source File: HibernateJpaVendorAdapter.java    From spring4-understanding with Apache License 2.0 6 votes vote down vote up
/**
 * 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;
	}
}
 
Example #3
Source File: FunctionalTestCase.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * 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;
}
 
Example #4
Source File: TestCase.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * 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;
}