Top Description Fields Constructors Methods
org.hibernate.criterion

public Class SQLCriterion

extends Object
implements Criterion
Class Inheritance
All Implemented Interfaces
org.hibernate.criterion.Criterion, java.io.Serializable
Imports
org.hibernate.Criteria, org.hibernate.engine.spi.TypedValue, org.hibernate.internal.util.StringHelper, org.hibernate.type.Type

A SQL fragment. The string {alias} will be replaced by the alias of the root entity.

Field Summary

Modifier and TypeField and Description
private final String
private final TypedValue[]

Constructor Summary

AccessConstructor and Description
protected
SQLCriterion(String sql, Object[] values, Type[] types)

protected
SQLCriterion(String sql, Object value, Type type)

protected

Method Summary

Modifier and TypeMethod and Description
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 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

sqlback to summary
private final String sql
typedValuesback to summary
private final TypedValue[] typedValues

Constructor Detail

SQLCriterionback to summary
protected SQLCriterion(String sql, Object[] values, Type[] types)
SQLCriterionback to summary
protected SQLCriterion(String sql, Object value, Type type)
SQLCriterionback to summary
protected SQLCriterion(String sql)

Method Detail

getTypedValuesback to summary
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)

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
toSqlStringback to summary
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery)

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
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