org.hibernate.criterion

Class LogicalExpression

Implemented Interfaces:
Criterion, Serializable

public class LogicalExpression
extends java.lang.Object
implements Criterion

Superclass of binary logical expressions
Author:
Gavin King

Constructor Summary

LogicalExpression(Criterion lhs, Criterion rhs, String op)

Method Summary

String
getOp()
TypedValue[]
getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)
Return typed values for all parameters in the rendered SQL fragment
String
toSqlString(Criteria criteria, CriteriaQuery criteriaQuery)
Render the SQL fragment
String
toString()

Constructor Details

LogicalExpression

protected LogicalExpression(Criterion lhs,
                            Criterion rhs,
                            String op)

Method Details

getOp

public String getOp()

getTypedValues

public TypedValue[] getTypedValues(Criteria criteria,
                                   CriteriaQuery criteriaQuery)
            throws HibernateException
Return typed values for all parameters in the rendered SQL fragment
Specified by:
getTypedValues in interface Criterion
Parameters:
criteria - The local criteria
criteriaQuery - The overal criteria query
Returns:
The types values (for binding)
Throws:
HibernateException - Problem determining types.

toSqlString

public String toSqlString(Criteria criteria,
                          CriteriaQuery criteriaQuery)
            throws HibernateException
Render the SQL fragment
Specified by:
toSqlString in interface Criterion
Parameters:
criteria - The local criteria
criteriaQuery - The overal criteria query
Returns:
The generated SQL fragment
Throws:
HibernateException - Problem during rendering.

toString

public String toString()