Class Predicate
- java.lang.Object
-
- org.castor.cpa.persistence.sql.query.condition.Condition
-
- org.castor.cpa.persistence.sql.query.condition.Predicate
-
- All Implemented Interfaces:
QueryObject
- Direct Known Subclasses:
IsNullPredicate
public abstract class Predicate extends Condition
Abstract base class for all predicates.- Version:
- $Revision$ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Ahmad Hassan, Ralf Joachim
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPredicate(Expression expression, boolean evaluateTo)Construct a predicate with given expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluateTo()Returns if the predicate should evaluate totrueorfalse.Expressionexpression()Expression to apply the predicate to.Conditionnot()Builder method to invert a condition.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.castor.cpa.persistence.sql.query.QueryObject
accept
-
-
-
-
Constructor Detail
-
Predicate
protected Predicate(Expression expression, boolean evaluateTo)
Construct a predicate with given expression.- Parameters:
expression- Expression to apply the predicate to.evaluateTo- What is the expected result of the evaluation?
-
-
Method Detail
-
expression
public final Expression expression()
Expression to apply the predicate to.- Returns:
- Expression to apply the predicate to.
-
evaluateTo
public final boolean evaluateTo()
Returns if the predicate should evaluate totrueorfalse.- Returns:
trueif the predicate should evaluate totrue,falseotherwise.
-
-