org.apache.openjpa.kernel.exps
Class Val

java.lang.Object
  extended by org.apache.openjpa.kernel.exps.Val
All Implemented Interfaces:
Value

public abstract class Val
extends java.lang.Object
implements Value

An in-memory representation of a Value.

Author:
Abe White

Constructor Summary
Val()
           
 
Method Summary
protected  java.util.Collection eval(java.util.Collection candidates, java.lang.Object orig, StoreContext ctx, java.lang.Object[] params)
          Return a list of values resulting from evaluating each given candidate.
protected abstract  java.lang.Object eval(java.lang.Object candidate, java.lang.Object orig, StoreContext ctx, java.lang.Object[] params)
          Return this value for the given candidate.
 java.lang.Object evaluate(java.util.Collection candidates, java.lang.Object orig, StoreContext ctx, java.lang.Object[] params)
          Return this value as an aggregate projection on the given group of candidates.
 java.lang.Object evaluate(java.lang.Object candidate, java.lang.Object orig, StoreContext ctx, java.lang.Object[] params)
          Return this value as a projection on the given candidate.
 ClassMetaData getMetaData()
          Return any associated persistent type.
abstract  boolean hasVariables()
          Return true if this value involves the use of variables.
 void setMetaData(ClassMetaData meta)
          Associate a persistent type with this value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.kernel.exps.Value
getType, isVariable, setImplicitType
 

Constructor Detail

Val

public Val()
Method Detail

evaluate

public final java.lang.Object evaluate(java.lang.Object candidate,
                                       java.lang.Object orig,
                                       StoreContext ctx,
                                       java.lang.Object[] params)
Return this value as a projection on the given candidate.


evaluate

public final java.lang.Object evaluate(java.util.Collection candidates,
                                       java.lang.Object orig,
                                       StoreContext ctx,
                                       java.lang.Object[] params)
Return this value as an aggregate projection on the given group of candidates.


hasVariables

public abstract boolean hasVariables()
Return true if this value involves the use of variables.


eval

protected abstract java.lang.Object eval(java.lang.Object candidate,
                                         java.lang.Object orig,
                                         StoreContext ctx,
                                         java.lang.Object[] params)
Return this value for the given candidate.


eval

protected java.util.Collection eval(java.util.Collection candidates,
                                    java.lang.Object orig,
                                    StoreContext ctx,
                                    java.lang.Object[] params)
Return a list of values resulting from evaluating each given candidate. By default, this implementation invokes #eval(Object,Object,StoreContext,Map) for each instance and packs the return value into a new list. Aggregates should override.


getMetaData

public ClassMetaData getMetaData()
Description copied from interface: Value
Return any associated persistent type.

Specified by:
getMetaData in interface Value

setMetaData

public void setMetaData(ClassMetaData meta)
Description copied from interface: Value
Associate a persistent type with this value.

Specified by:
setMetaData in interface Value


Copyright © 2006 Apache Software Foundation. All Rights Reserved.