Package org.apache.openjpa.kernel
Class ExpressionStoreQuery.AbstractExpressionExecutor
java.lang.Object
org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
org.apache.openjpa.kernel.ExpressionStoreQuery.AbstractExpressionExecutor
- All Implemented Interfaces:
StoreQuery.Executor
- Direct Known Subclasses:
ExpressionStoreQuery.DataStoreExecutor,ExpressionStoreQuery.InMemoryExecutor,PreparedSQLStoreQuery.PreparedSQLExecutor
- Enclosing class:
- ExpressionStoreQuery
public abstract static class ExpressionStoreQuery.AbstractExpressionExecutor
extends AbstractStoreQuery.AbstractExecutor
implements StoreQuery.Executor
Provides support for queries that hold query information
in a
QueryExpressions instance.- Author:
- Marc Prud'hommeaux
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertNotContainer(Value val, StoreQuery q) Throw proper exception if given value is a collection/map/array.final ClassMetaData[]Return an array of all persistent classes used in this query, or empty array if unknown.final StringIf this is not a projection but the candidate results are placed into a result class with an alias, return that alias.final boolean[]Return the ordering direction for all ordering clauses, or empty array if none.final intReturns the operation this executor is meant to execute.final OrderedMap<Object,Class<?>> Return a map of parameter names to types.final String[]Return the alias for each projection element, or empty array if not a projection.Class<?>[]Return the expected types of the projections used by this query, or an empty array if not a projection.voidgetRange(StoreQuery q, Object[] params, StoreQuery.Range range) Mutate the given range to set any range information stored in the query string and/or parameters.final Class<?>Returns the result class, if any.final ResultShape<?>final MapReturn a map ofFieldMetaDatato updateConstants, in cases where this query is for a bulk update.final booleanWhether the compiled query has grouping.final booleanReturn true if the compiled query is an aggregate.final booleanbooleanReturn true if this executor packs projections into the result class itself.Object[]toParameterArray(StoreQuery q, Map<?, ?> userParams) Creates a Object[] from the values of the given user parameters.final voidValidate components of query.Methods inherited from class org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
executeDelete, executeUpdate, getDataStoreActions, getOrderingValue, getParameterTypes, getQueryExpressionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.openjpa.kernel.StoreQuery.Executor
executeDelete, executeQuery, executeUpdate, getDataStoreActions, getOrderingValue, getParameterTypes, getQueryExpressions
-
Constructor Details
-
AbstractExpressionExecutor
public AbstractExpressionExecutor()
-
-
Method Details
-
assertNotContainer
Throw proper exception if given value is a collection/map/array. -
validate
Description copied from interface:StoreQuery.ExecutorValidate components of query.- Specified by:
validatein interfaceStoreQuery.Executor- Overrides:
validatein classAbstractStoreQuery.AbstractExecutor
-
getRange
Description copied from interface:StoreQuery.ExecutorMutate the given range to set any range information stored in the query string and/or parameters.- Specified by:
getRangein interfaceStoreQuery.Executor- Overrides:
getRangein classAbstractStoreQuery.AbstractExecutor
-
getResultClass
Description copied from interface:StoreQuery.ExecutorReturns the result class, if any.- Specified by:
getResultClassin interfaceStoreQuery.Executor- Overrides:
getResultClassin classAbstractStoreQuery.AbstractExecutor
-
getResultShape
- Specified by:
getResultShapein interfaceStoreQuery.Executor- Overrides:
getResultShapein classAbstractStoreQuery.AbstractExecutor
-
getAscending
Description copied from interface:StoreQuery.ExecutorReturn the ordering direction for all ordering clauses, or empty array if none.- Specified by:
getAscendingin interfaceStoreQuery.Executor- Overrides:
getAscendingin classAbstractStoreQuery.AbstractExecutor
-
getAlias
Description copied from interface:StoreQuery.ExecutorIf this is not a projection but the candidate results are placed into a result class with an alias, return that alias.- Specified by:
getAliasin interfaceStoreQuery.Executor- Overrides:
getAliasin classAbstractStoreQuery.AbstractExecutor
-
getProjectionAliases
Description copied from interface:StoreQuery.ExecutorReturn the alias for each projection element, or empty array if not a projection.- Specified by:
getProjectionAliasesin interfaceStoreQuery.Executor- Overrides:
getProjectionAliasesin classAbstractStoreQuery.AbstractExecutor
-
getProjectionTypes
Description copied from interface:StoreQuery.ExecutorReturn the expected types of the projections used by this query, or an empty array if not a projection.- Specified by:
getProjectionTypesin interfaceStoreQuery.Executor- Overrides:
getProjectionTypesin classAbstractStoreQuery.AbstractExecutor
-
getOperation
Description copied from interface:StoreQuery.ExecutorReturns the operation this executor is meant to execute.- Specified by:
getOperationin interfaceStoreQuery.Executor- Overrides:
getOperationin classAbstractStoreQuery.AbstractExecutor- See Also:
-
isAggregate
Description copied from interface:StoreQuery.ExecutorReturn true if the compiled query is an aggregate.- Specified by:
isAggregatein interfaceStoreQuery.Executor- Overrides:
isAggregatein classAbstractStoreQuery.AbstractExecutor
-
isDistinct
- Specified by:
isDistinctin interfaceStoreQuery.Executor- Overrides:
isDistinctin classAbstractStoreQuery.AbstractExecutor
-
hasGrouping
Description copied from interface:StoreQuery.ExecutorWhether the compiled query has grouping.- Specified by:
hasGroupingin interfaceStoreQuery.Executor- Overrides:
hasGroupingin classAbstractStoreQuery.AbstractExecutor
-
getOrderedParameterTypes
Description copied from interface:StoreQuery.ExecutorReturn a map of parameter names to types. The returnedMap.entrySet()'sIteratormust return values in the order in which they were declared or used.- Specified by:
getOrderedParameterTypesin interfaceStoreQuery.Executor- Overrides:
getOrderedParameterTypesin classAbstractStoreQuery.AbstractExecutor
-
toParameterArray
Creates a Object[] from the values of the given user parameters.- Specified by:
toParameterArrayin interfaceStoreQuery.Executor- Returns:
- array with parameter values ordered in the same way as this receiver's executeXXX() method expects.
-
getUpdates
Description copied from interface:StoreQuery.ExecutorReturn a map ofFieldMetaDatato updateConstants, in cases where this query is for a bulk update.- Specified by:
getUpdatesin interfaceStoreQuery.Executor- Overrides:
getUpdatesin classAbstractStoreQuery.AbstractExecutor
-
getAccessPathMetaDatas
Description copied from interface:StoreQuery.ExecutorReturn an array of all persistent classes used in this query, or empty array if unknown.- Specified by:
getAccessPathMetaDatasin interfaceStoreQuery.Executor- Overrides:
getAccessPathMetaDatasin classAbstractStoreQuery.AbstractExecutor
-
isPacking
Description copied from interface:StoreQuery.ExecutorReturn true if this executor packs projections into the result class itself. Executors for query languages that allow projections without result clauses must return true and perform the result packing themselves.- Specified by:
isPackingin interfaceStoreQuery.Executor- Overrides:
isPackingin classAbstractStoreQuery.AbstractExecutor
-