org.apache.openjpa.kernel.exps
Class BindVariableAndExpression

java.lang.Object
  extended by org.apache.openjpa.kernel.exps.Exp
      extended by org.apache.openjpa.kernel.exps.AndExpression
          extended by org.apache.openjpa.kernel.exps.BindVariableAndExpression
All Implemented Interfaces:
Serializable, Expression

 class BindVariableAndExpression
extends AndExpression

Any contains(var) expression must be followed by at least one AND clause using the variable 'var'. This expression type represents one of those and AND clauses. It is responsible for evaluating the right subexpression for every possible value of the variable.

Author:
Abe White

Constructor Summary
BindVariableAndExpression(BindVariableExpression var, Exp exp)
          Constructor.
 
Method Summary
protected  boolean eval(Collection candidates, StoreContext ctx, Object[] params)
          Evaluate the expression for the given group.
protected  boolean eval(Object candidate, Object orig, StoreContext ctx, Object[] params)
          Evaluate the expression for the given context candidate and original candidate.
 
Methods inherited from class org.apache.openjpa.kernel.exps.AndExpression
acceptVisit, getExpression1, getExpression2
 
Methods inherited from class org.apache.openjpa.kernel.exps.Exp
evaluate, evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindVariableAndExpression

public BindVariableAndExpression(BindVariableExpression var,
                                 Exp exp)
Constructor. Provide expression binding the variable and the expression it is AND'd with.

Method Detail

eval

protected boolean eval(Object candidate,
                       Object orig,
                       StoreContext ctx,
                       Object[] params)
Description copied from class: Exp
Evaluate the expression for the given context candidate and original candidate.

Overrides:
eval in class AndExpression

eval

protected boolean eval(Collection candidates,
                       StoreContext ctx,
                       Object[] params)
Description copied from class: Exp
Evaluate the expression for the given group.

Overrides:
eval in class AndExpression


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.