org.hibernate.criterion

Class Junction

Implemented Interfaces:
Criterion, Serializable
Known Direct Subclasses:
Conjunction, Disjunction

public class Junction
extends java.lang.Object
implements Criterion

A sequence of a logical expressions combined by some associative logical operator
Author:
Gavin King

Constructor Summary

Junction(String op)

Method Summary

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

Constructor Details

Junction

protected Junction(String op)

Method Details

add

public Junction add(Criterion criterion)

getOp

public String getOp()

getTypedValues

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

toSqlString

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

toString

public String toString()
See Also:
java.lang.Object.toString()