Package org.hibernate.criterion
Class SimpleExpression
- java.lang.Object
-
- org.hibernate.criterion.SimpleExpression
-
- All Implemented Interfaces:
Serializable,Criterion
public class SimpleExpression extends Object implements Criterion
superclass for "simple" comparisons (with SQL binary operators)- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSimpleExpression(String propertyName, Object value, String op)protectedSimpleExpression(String propertyName, Object value, String op, boolean ignoreCase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetOp()StringgetPropertyName()TypedValue[]getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)Return typed values for all parameters in the rendered SQL fragmentObjectgetValue()SimpleExpressionignoreCase()Make case insensitive.StringtoSqlString(Criteria criteria, CriteriaQuery criteriaQuery)Render the SQL fragmentStringtoString()
-
-
-
Method Detail
-
getOp
protected final String getOp()
-
getPropertyName
public String getPropertyName()
-
getValue
public Object getValue()
-
ignoreCase
public SimpleExpression ignoreCase()
Make case insensitive. No effect for non-String values- Returns:
this, for method chaining
-
toSqlString
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException
Description copied from interface:CriterionRender the SQL fragment- Specified by:
toSqlStringin interfaceCriterion- Parameters:
criteria- The local criteriacriteriaQuery- The overal criteria query- Returns:
- The generated SQL fragment
- Throws:
HibernateException- Problem during rendering.
-
getTypedValues
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException
Description copied from interface:CriterionReturn typed values for all parameters in the rendered SQL fragment- Specified by:
getTypedValuesin interfaceCriterion- Parameters:
criteria- The local criteriacriteriaQuery- The overal criteria query- Returns:
- The types values (for binding)
- Throws:
HibernateException- Problem determining types.
-
-