Top Description Fields Constructors Methods
org.hibernate.criterion

public Class SimpleExpression

extends Object
implements Criterion
Class Inheritance
All Implemented Interfaces
org.hibernate.criterion.Criterion, java.io.Serializable
Imports
java.sql.Types, java.util.Locale, org.hibernate.Criteria, .HibernateException, org.hibernate.engine.spi.SessionFactoryImplementor, .TypedValue, org.hibernate.type.Type

superclass for "simple" comparisons (with SQL binary operators)
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private boolean
private final String
private final String
private final Object

Constructor Summary

AccessConstructor and Description
protected
SimpleExpression(String propertyName, Object value, String op)

protected
SimpleExpression(String propertyName, Object value, String op, boolean ignoreCase)

Method Summary

Modifier and TypeMethod and Description
public final String
public String
public TypedValue[]
getTypedValues(Criteria
The local criteria
criteria
,
CriteriaQuery
The overall criteria query
criteriaQuery
)

Implements org.hibernate.criterion.Criterion.getTypedValues.

Return typed values for all parameters in the rendered SQL fragment
public Object
public SimpleExpression

Returns:

this, for method chaining
ignoreCase
()

Make case insensitive.

public String
toSqlString(Criteria
The local criteria
criteria
,
CriteriaQuery
The overall criteria query
criteriaQuery
)

Implements org.hibernate.criterion.Criterion.toSqlString.

Render the SQL fragment
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

ignoreCaseback to summary
private boolean ignoreCase
opback to summary
private final String op
propertyNameback to summary
private final String propertyName
valueback to summary
private final Object value

Constructor Detail

SimpleExpressionback to summary
protected SimpleExpression(String propertyName, Object value, String op)
SimpleExpressionback to summary
protected SimpleExpression(String propertyName, Object value, String op, boolean ignoreCase)

Method Detail

getOpback to summary
public final String getOp()
getPropertyNameback to summary
public String getPropertyName()
getTypedValuesback to summary
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException

Implements org.hibernate.criterion.Criterion.getTypedValues.

Doc from org.hibernate.criterion.Criterion.getTypedValues.

Return typed values for all parameters in the rendered SQL fragment

Parameters
criteria:Criteria

The local criteria

criteriaQuery:CriteriaQuery

The overall criteria query

Returns:TypedValue[]

The types values (for binding)

Annotations
@Override
Exceptions
HibernateException:
Problem determining types.
getValueback to summary
public Object getValue()
ignoreCaseback to summary
public SimpleExpression ignoreCase()

Make case insensitive. No effect for non-String values

Returns:SimpleExpression

this, for method chaining

toSqlStringback to summary
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException

Implements org.hibernate.criterion.Criterion.toSqlString.

Doc from org.hibernate.criterion.Criterion.toSqlString.

Render the SQL fragment

Parameters
criteria:Criteria

The local criteria

criteriaQuery:CriteriaQuery

The overall criteria query

Returns:String

The generated SQL fragment

Annotations
@Override
Exceptions
HibernateException:
Problem during rendering.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override