Java Code Examples for org.hibernate.sql.CaseFragment

The following examples show how to use org.hibernate.sql.CaseFragment. These examples are extracted from open source projects. 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
private CaseFragment discriminatorFragment(String alias) {
	CaseFragment cases = getFactory().getDialect().createCaseFragment();

	for ( int i = 0; i < discriminatorValues.length; i++ ) {
		cases.addWhenColumnNotNull(
				generateTableAlias( alias, notNullColumnTableNumbers[i] ),
				notNullColumnNames[i],
				discriminatorValues[i]
		);
	}

	return cases;
}
 
Example 2
private CaseFragment discriminatorFragment(String alias) {
	CaseFragment cases = getFactory().getDialect().createCaseFragment();

	for ( int i=0; i<discriminatorValues.length; i++ ) {
		cases.addWhenColumnNotNull(
			generateTableAlias( alias, notNullColumnTableNumbers[i] ),
			notNullColumnNames[i],
			discriminatorValues[i]
		);
	}

	return cases;
}
 
Example 3
Source Project: lams   Source File: DerbyDialect.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public CaseFragment createCaseFragment() {
	return new DerbyCaseFragment();
}
 
Example 4
Source Project: lams   Source File: SAPDBDialect.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public CaseFragment createCaseFragment() {
	return new DecodeCaseFragment();
}
 
Example 5
Source Project: lams   Source File: OracleDialect.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public CaseFragment createCaseFragment() {
	return new DecodeCaseFragment();
}
 
Example 6
Source Project: lams   Source File: RDMSOS2200Dialect.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public CaseFragment createCaseFragment() {
	return new DecodeCaseFragment();
}
 
Example 7
Source Project: lams   Source File: MckoiDialect.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public CaseFragment createCaseFragment() {
	return new MckoiCaseFragment();
}
 
Example 8
Source Project: lams   Source File: Oracle9iDialect.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public CaseFragment createCaseFragment() {
	// Oracle did add support for ANSI CASE statements in 9i
	return new ANSICaseFragment();
}
 
Example 9
Source Project: gemfirexd-oss   Source File: GemFireXDDialectBase.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public CaseFragment createCaseFragment() {
  return new DerbyCaseFragment();
}
 
Example 10
/**
 * Return the case statement modified for Cloudscape.
 */
public CaseFragment createCaseFragment() {
	return new DerbyCaseFragment();
}
 
Example 11
public CaseFragment createCaseFragment() {
	return new DecodeCaseFragment();
}
 
Example 12
public CaseFragment createCaseFragment() {
	return new DecodeCaseFragment();
}
 
Example 13
public CaseFragment createCaseFragment() {
	return new DecodeCaseFragment();
}
 
Example 14
public CaseFragment createCaseFragment() {
	return new MckoiCaseFragment();
}
 
Example 15
public CaseFragment createCaseFragment() {
	// Oracle did add support for ANSI CASE statements in 9i
	return new ANSICaseFragment();
}
 
Example 16
Source Project: gemfirexd-oss   Source File: GemFireXDDialectBase.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public CaseFragment createCaseFragment() {
  return new DerbyCaseFragment();
}
 
Example 17
Source Project: keycloak   Source File: DelegatingDialect.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public CaseFragment createCaseFragment() {
    return getInstance().createCaseFragment();
}
 
Example 18
Source Project: lams   Source File: Oracle8iDialect.java    License: GNU General Public License v2.0 2 votes vote down vote up
/**
 * Map case support to the Oracle DECODE function.  Oracle did not
 * add support for CASE until 9i.
 * <p/>
 * {@inheritDoc}
 */
@Override
public CaseFragment createCaseFragment() {
	return new DecodeCaseFragment();
}
 
Example 19
Source Project: lams   Source File: Dialect.java    License: GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a {@link org.hibernate.sql.CaseFragment} strategy responsible
 * for handling this dialect's variations in how CASE statements are
 * handled.
 *
 * @return This dialect's {@link org.hibernate.sql.CaseFragment} strategy.
 */
public CaseFragment createCaseFragment() {
	return new ANSICaseFragment();
}
 
Example 20
/**
 * Map case support to the Oracle DECODE function.  Oracle did not
 * add support for CASE until 9i.
 *
 * @return The oracle CASE -> DECODE fragment
 */
public CaseFragment createCaseFragment() {
	return new DecodeCaseFragment();
}
 
Example 21
/**
 * Create a {@link org.hibernate.sql.CaseFragment} strategy responsible
 * for handling this dialect's variations in how CASE statements are
 * handled.
 *
 * @return This dialect's {@link org.hibernate.sql.CaseFragment} strategy.
 */
public CaseFragment createCaseFragment() {
	return new ANSICaseFragment();
}