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 Details

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

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