org.apache.openjpa.jdbc.kernel.exps
Class CollectionParam
java.lang.Object
org.apache.openjpa.jdbc.kernel.exps.AbstractVal
org.apache.openjpa.jdbc.kernel.exps.Const
org.apache.openjpa.jdbc.kernel.exps.CollectionParam
- All Implemented Interfaces:
- Serializable, Val, Constant, Parameter, Value
public class CollectionParam
- extends Const
- implements Parameter
A collection-valued input parameter in an in-expression.
- Author:
- Catalina Wei
- See Also:
- Serialized Form
| Fields inherited from interface org.apache.openjpa.jdbc.kernel.exps.Val |
ABS_VAL, ARGS_VAL, CMP_EQUAL, COALESCE_VAL, CONCAT_VAL, FORCE_OUTER, GENERALCASE_VAL, INDEXOF_VAL, JOIN_REL, LENGTH_VAL, LOCATE_VAL, LOWER_VAL, MATH_VAL, NULL_CMP, NULLIF_VAL, SIMPLECASE_VAL, SQRT_VAL, SUBSTRING_VAL, TRIM_VAL, UPPER_VAL, VAL, WHENCONDITION_VAL, WHENSCALAR_VAL |
|
Method Summary |
void |
appendTo(Select sel,
ExpContext ctx,
ExpState state,
SQLBuffer sql,
int index)
Append the indexth SQL element to the given buffer. |
void |
calculateValue(Select sel,
ExpContext ctx,
ExpState state,
Val other,
ExpState otherState)
Calculate and cache the SQL for this value. |
CollectionParam |
clone()
|
int |
getIndex()
|
Object |
getParameterKey()
|
Object |
getSQLValue(Select sel,
ExpContext ctx,
ExpState state)
Return the SQL value of this constant. |
Class |
getType()
|
Object |
getValue(ExpContext ctx,
ExpState state)
Return the value of this constant. |
Object |
getValue(Object[] params)
|
ExpState |
initialize(Select sel,
ExpContext ctx,
int flags)
Initialize the value. |
void |
setImplicitType(Class type)
|
void |
setIndex(int idx)
|
| Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.Const |
appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendSize, getMetaData, groupBy, isSQLValueNull, length, load, orderBy, select, selectColumns, setMetaData |
| Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.AbstractVal |
acceptVisit, appendIndex, appendType, getAlias, getId, getName, getPath, getSelectAs, isAggregate, isVariable, isXPath, setAlias, toDataStoreValue |
| Methods inherited from interface org.apache.openjpa.kernel.exps.Value |
acceptVisit, getAlias, getMetaData, getName, getPath, getSelectAs, isAggregate, isVariable, isXPath, setAlias, setMetaData |
CollectionParam
public CollectionParam(Object key,
Class type)
- Constructor. Supply parameter name and type.
clone
public CollectionParam clone()
- Overrides:
clone in class Object
getParameterKey
public Object getParameterKey()
- Specified by:
getParameterKey in interface Parameter
getType
public Class getType()
- Specified by:
getType in interface Value
setImplicitType
public void setImplicitType(Class type)
- Specified by:
setImplicitType in interface Value
getIndex
public int getIndex()
setIndex
public void setIndex(int idx)
- Specified by:
setIndex in interface Parameter
getValue
public Object getValue(Object[] params)
- Specified by:
getValue in interface Constant
getValue
public Object getValue(ExpContext ctx,
ExpState state)
- Description copied from class:
Const
- Return the value of this constant. May be more robust than the
parameters-only form.
- Overrides:
getValue in class Const
getSQLValue
public Object getSQLValue(Select sel,
ExpContext ctx,
ExpState state)
- Description copied from class:
Const
- Return the SQL value of this constant.
- Overrides:
getSQLValue in class Const
initialize
public ExpState initialize(Select sel,
ExpContext ctx,
int flags)
- Description copied from interface:
Val
- Initialize the value. This method should recursively initialize any
sub-values.
- Specified by:
initialize in interface Val- Overrides:
initialize in class Const
calculateValue
public void calculateValue(Select sel,
ExpContext ctx,
ExpState state,
Val other,
ExpState otherState)
- Description copied from interface:
Val
- Calculate and cache the SQL for this value. This method is called
before
length or any append methods.
- Specified by:
calculateValue in interface Val- Overrides:
calculateValue in class Const
other - the value being compared to, or null if not a comparison
appendTo
public void appendTo(Select sel,
ExpContext ctx,
ExpState state,
SQLBuffer sql,
int index)
- Description copied from interface:
Val
- Append the
indexth SQL element to the given buffer.
- Specified by:
appendTo in interface Val
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.