FileDocCategorySizeDatePackage
SQLCriterion.javaAPI DocHibernate 3.2.51187Thu Feb 17 20:47:28 GMT 2005org.hibernate.criterion

SQLCriterion

public class SQLCriterion extends Object implements Criterion
A SQL fragment. The string {alias} will be replaced by the alias of the root entity.

Fields Summary
private final String
sql
private final org.hibernate.engine.TypedValue[]
typedValues
Constructors Summary
protected SQLCriterion(String sql, Object[] values, org.hibernate.type.Type[] types)

		this.sql = sql;
		typedValues = new TypedValue[values.length];
		for ( int i=0; i<typedValues.length; i++ ) {
			typedValues[i] = new TypedValue( types[i], values[i], EntityMode.POJO );
		}
	
Methods Summary
public org.hibernate.engine.TypedValue[]getTypedValues(org.hibernate.Criteria criteria, CriteriaQuery criteriaQuery)

		return typedValues;
	
public java.lang.StringtoSqlString(org.hibernate.Criteria criteria, CriteriaQuery criteriaQuery)

		return StringHelper.replace( sql, "{alias}", criteriaQuery.getSQLAlias(criteria) );
	
public java.lang.StringtoString()

		return sql;