org.castor.cpa.persistence.sql.query.condition
Class Predicate

java.lang.Object
  extended by org.castor.cpa.persistence.sql.query.condition.Condition
      extended by 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: 8994 $ $Date: 2011-08-02 01:40:59 +0200 (Di, 02 Aug 2011) $
Author:
Ahmad Hassan, Ralf Joachim

Constructor Summary
protected Predicate(Expression expression, boolean evaluateTo)
          Construct a predicate with given expression.
 
Method Summary
 boolean evaluateTo()
          Returns if the predicate should evaluate to true or false.
 Expression expression()
          Expression to apply the predicate to.
 Condition not()
          Builder method to invert a condition.
 
Methods inherited from class org.castor.cpa.persistence.sql.query.condition.Condition
and, or
 
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 to true or false.

Returns:
true if the predicate should evaluate to true, false otherwise.

not

public final Condition not()
Description copied from class: Condition
Builder method to invert a condition. A condition that evaluated to TRUE before calling this method will evaluate to FALSE thereafter.

Specified by:
not in class Condition
Returns:
Negated condition.


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com