Class CollectionParam
java.lang.Object
org.apache.openjpa.jdbc.kernel.exps.CollectionParam
- All Implemented Interfaces:
- Serializable,- Val,- Constant,- Parameter,- Value
A collection-valued input parameter in an in-expression.
- Author:
- Catalina Wei
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsFields inherited from interface org.apache.openjpa.jdbc.kernel.exps.ValABS_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
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidacceptVisit(ExpressionVisitor visitor) Accept a visit from a tree visitor.voidappendIndex(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql) Append the SQL checking the index of this value.voidappendIsEmpty(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql) Append the SQL testing whether this value is empty to the given buffer.voidappendIsNotEmpty(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql) Append the SQL testing whether this value is not empty to the given buffer.voidappendIsNotNull(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql) Append the SQL testing whether this value is not null to the given buffer.voidappendIsNull(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql) Append the SQL testing whether this value is null to the given buffer.voidappendSize(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql) Append the SQL checking the size of this value.voidappendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) Append theindexth SQL element to the given buffer.voidappendType(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql) Append the SQL checking the type of this value.voidcalculateValue(Select sel, ExpContext ctx, ExpState state, Val other, ExpState otherState) Calculate and cache the SQL for this value.clone()getAlias()Return select item aliasintgetId()intgetIndex()Return any associated persistent type.getName()Returns the key of the parameter.getPath()Return 'this' concrete class if alias is set, otherwise nullgetSQLValue(Select sel, ExpContext ctx, ExpState state) Return the SQL value of this constant.getType()Return the expected type for this value, orObjectif the type is unknown.Return the value for this constant given the specified parameters.getValue(ExpContext ctx, ExpState state) Return the value of this constant.voidgroupBy(Select sel, ExpContext ctx, ExpState state) Group by this value.initialize(Select sel, ExpContext ctx, int flags) Initialize the value.booleanReturn true if this value is an aggregate.booleanisSQLValueNull(Select sel, ExpContext ctx, ExpState state) Return true if this constant's SQL value is equivalent to NULL.booleanReturn true if this value is a variable.booleanisXPath()Return true if this value is an XML Path.intlength(Select sel, ExpContext ctx, ExpState state) Return the number of SQL elements in this value.load(ExpContext ctx, ExpState state, Result res) Load the data for this value.voidorderBy(Select sel, ExpContext ctx, ExpState state, boolean asc) Order by this value.voidselect(Select sel, ExpContext ctx, ExpState state, boolean pks) Select the data for this value.voidselectColumns(Select sel, ExpContext ctx, ExpState state, boolean pks) Select just the columns for this value.voidSet select item aliasvoidsetImplicitType(Class type) Set the implicit type of the value, based on how it is used in the filter.voidsetIndex(int idx) Set the index of this parameter.voidsetMetaData(ClassMetaData meta) Associate a persistent type with this value.toDataStoreValue(Select sel, ExpContext ctx, ExpState state, Object val) Return the datastore value of the given object in the context of this value.Methods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.openjpa.kernel.exps.ValueacceptVisit, getAlias, getMetaData, getName, getPath, isAggregate, isVariable, isXPath, setAlias, setMetaData
- 
Field Details- 
TRUE- See Also:
 
- 
FALSE- See Also:
 
 
- 
- 
Constructor Details- 
CollectionParamConstructor. Supply parameter name and type.
 
- 
- 
Method Details- 
clone
- 
getParameterKeyDescription copied from interface:ParameterReturns the key of the parameter.- Specified by:
- getParameterKeyin interface- Parameter
 
- 
getTypeDescription copied from interface:ValueReturn the expected type for this value, orObjectif the type is unknown.
- 
setImplicitTypeDescription copied from interface:ValueSet the implicit type of the value, based on how it is used in the filter. This method is only called on values who returnObjectfromValue.getType().- Specified by:
- setImplicitTypein interface- Value
 
- 
getIndexpublic int getIndex()
- 
setIndexpublic void setIndex(int idx) Description copied from interface:ParameterSet the index of this parameter.
- 
getValueDescription copied from interface:ConstantReturn the value for this constant given the specified parameters.
- 
getValueReturn the value of this constant. May be more robust than the parameters-only form.
- 
getSQLValueReturn the SQL value of this constant.
- 
initializeDescription copied from interface:ValInitialize the value. This method should recursively initialize any sub-values.- Specified by:
- initializein interface- Val
 
- 
calculateValuepublic void calculateValue(Select sel, ExpContext ctx, ExpState state, Val other, ExpState otherState) Description copied from interface:ValCalculate and cache the SQL for this value. This method is called beforelengthor anyappendmethods.- Specified by:
- calculateValuein interface- Val
- other- the value being compared to, or null if not a comparison
 
- 
appendToDescription copied from interface:ValAppend theindexth SQL element to the given buffer.
- 
getMetaDataDescription copied from interface:ValueReturn any associated persistent type.- Specified by:
- getMetaDatain interface- Value
 
- 
setMetaDataDescription copied from interface:ValueAssociate a persistent type with this value.- Specified by:
- setMetaDatain interface- Value
 
- 
isSQLValueNullReturn true if this constant's SQL value is equivalent to NULL.
- 
selectDescription copied from interface:ValSelect the data for this value.
- 
selectColumnsDescription copied from interface:ValSelect just the columns for this value.- Specified by:
- selectColumnsin interface- Val
 
- 
groupByDescription copied from interface:ValGroup by this value.
- 
orderByDescription copied from interface:ValOrder by this value.
- 
loadDescription copied from interface:ValLoad the data for this value.- Specified by:
- loadin interface- Val
- Throws:
- SQLException
 
- 
lengthDescription copied from interface:ValReturn the number of SQL elements in this value.
- 
appendIsEmptyDescription copied from interface:ValAppend the SQL testing whether this value is empty to the given buffer.- Specified by:
- appendIsEmptyin interface- Val
 
- 
appendIsNotEmptyDescription copied from interface:ValAppend the SQL testing whether this value is not empty to the given buffer.- Specified by:
- appendIsNotEmptyin interface- Val
 
- 
appendSizeDescription copied from interface:ValAppend the SQL checking the size of this value.- Specified by:
- appendSizein interface- Val
 
- 
appendIsNullDescription copied from interface:ValAppend the SQL testing whether this value is null to the given buffer.- Specified by:
- appendIsNullin interface- Val
 
- 
appendIsNotNullDescription copied from interface:ValAppend the SQL testing whether this value is not null to the given buffer.- Specified by:
- appendIsNotNullin interface- Val
 
- 
isVariablepublic boolean isVariable()Description copied from interface:ValueReturn true if this value is a variable.- Specified by:
- isVariablein interface- Value
 
- 
isAggregatepublic boolean isAggregate()Description copied from interface:ValueReturn true if this value is an aggregate.- Specified by:
- isAggregatein interface- Value
 
- 
isXPathpublic boolean isXPath()Description copied from interface:ValueReturn true if this value is an XML Path.
- 
toDataStoreValueDescription copied from interface:ValReturn the datastore value of the given object in the context of this value.- Specified by:
- toDataStoreValuein interface- Val
 
- 
appendIndexDescription copied from interface:ValAppend the SQL checking the index of this value.- Specified by:
- appendIndexin interface- Val
 
- 
appendTypeDescription copied from interface:ValAppend the SQL checking the type of this value.- Specified by:
- appendTypein interface- Val
 
- 
acceptVisitDescription copied from interface:ValueAccept a visit from a tree visitor.- Specified by:
- acceptVisitin interface- Value
 
- 
getIdpublic int getId()
- 
getAliasDescription copied from interface:ValueReturn select item alias
- 
setAliasDescription copied from interface:ValueSet select item alias
- 
getSelectAsDescription copied from interface:ValueReturn 'this' concrete class if alias is set, otherwise null- Specified by:
- getSelectAsin interface- Val
- Specified by:
- getSelectAsin interface- Value
 
- 
getPath
- 
getName
 
-