org.apache.openjpa.kernel.exps
Class CollectionParam

java.lang.Object
  extended by org.apache.openjpa.kernel.exps.Val
      extended by org.apache.openjpa.kernel.exps.CollectionParam
All Implemented Interfaces:
Serializable, Constant, Parameter, Value

 class CollectionParam
extends Val
implements Parameter

Represents a collection valued input parameter.

Author:
Catalina Wei

Constructor Summary
CollectionParam(Object name, Class type)
          Constructor.
 
Method Summary
protected  Object eval(Object candidate, Object orig, StoreContext ctx, Object[] params)
          Return this value for the given candidate.
 Object getParameterKey()
          Returns the key of the parameter.
 Class getType()
          Return the expected type for this value, or Object if the type is unknown.
 Object getValue(Object[] params)
          Return the value for this constant given the specified parameters.
 void setImplicitType(Class type)
          Set the implicit type of the value, based on how it is used in the filter.
 void setIndex(int index)
          Set the index of this parameter.
 
Methods inherited from class org.apache.openjpa.kernel.exps.Val
acceptVisit, eval, evaluate, evaluate, getAlias, getMetaData, getName, getPath, getSelectAs, isAggregate, isVariable, isXPath, setAlias, setMetaData
 
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
acceptVisit, getAlias, getMetaData, getName, getPath, getSelectAs, isAggregate, isVariable, isXPath, setAlias, setMetaData
 

Constructor Detail

CollectionParam

public CollectionParam(Object name,
                       Class type)
Constructor. Provide parameter name and type.

Method Detail

getParameterKey

public Object getParameterKey()
Description copied from interface: Parameter
Returns the key of the parameter.

Specified by:
getParameterKey in interface Parameter

getType

public Class getType()
Description copied from interface: Value
Return the expected type for this value, or Object if the type is unknown.

Specified by:
getType in interface Value

setImplicitType

public void setImplicitType(Class type)
Description copied from interface: Value
Set the implicit type of the value, based on how it is used in the filter. This method is only called on values who return Object from Value.getType().

Specified by:
setImplicitType in interface Value

setIndex

public void setIndex(int index)
Description copied from interface: Parameter
Set the index of this parameter.

Specified by:
setIndex in interface Parameter

getValue

public Object getValue(Object[] params)
Description copied from interface: Constant
Return the value for this constant given the specified parameters.

Specified by:
getValue in interface Constant

eval

protected Object eval(Object candidate,
                      Object orig,
                      StoreContext ctx,
                      Object[] params)
Description copied from class: Val
Return this value for the given candidate.

Specified by:
eval in class Val


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