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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
assertNotContainer
(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 String
If 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 int
Returns 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.void
getRange
(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 Map
Return a map ofFieldMetaData
to updateConstant
s, in cases where this query is for a bulk update.final boolean
Whether the compiled query has grouping.final boolean
Return true if the compiled query is an aggregate.final boolean
boolean
Return 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 void
Validate components of query.Methods inherited from class org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
executeDelete, executeUpdate, getDataStoreActions, getOrderingValue, getParameterTypes, getQueryExpressions
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.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.Executor
Validate components of query.- Specified by:
validate
in interfaceStoreQuery.Executor
- Overrides:
validate
in classAbstractStoreQuery.AbstractExecutor
-
getRange
Description copied from interface:StoreQuery.Executor
Mutate the given range to set any range information stored in the query string and/or parameters.- Specified by:
getRange
in interfaceStoreQuery.Executor
- Overrides:
getRange
in classAbstractStoreQuery.AbstractExecutor
-
getResultClass
Description copied from interface:StoreQuery.Executor
Returns the result class, if any.- Specified by:
getResultClass
in interfaceStoreQuery.Executor
- Overrides:
getResultClass
in classAbstractStoreQuery.AbstractExecutor
-
getResultShape
- Specified by:
getResultShape
in interfaceStoreQuery.Executor
- Overrides:
getResultShape
in classAbstractStoreQuery.AbstractExecutor
-
getAscending
Description copied from interface:StoreQuery.Executor
Return the ordering direction for all ordering clauses, or empty array if none.- Specified by:
getAscending
in interfaceStoreQuery.Executor
- Overrides:
getAscending
in classAbstractStoreQuery.AbstractExecutor
-
getAlias
Description copied from interface:StoreQuery.Executor
If this is not a projection but the candidate results are placed into a result class with an alias, return that alias.- Specified by:
getAlias
in interfaceStoreQuery.Executor
- Overrides:
getAlias
in classAbstractStoreQuery.AbstractExecutor
-
getProjectionAliases
Description copied from interface:StoreQuery.Executor
Return the alias for each projection element, or empty array if not a projection.- Specified by:
getProjectionAliases
in interfaceStoreQuery.Executor
- Overrides:
getProjectionAliases
in classAbstractStoreQuery.AbstractExecutor
-
getProjectionTypes
Description copied from interface:StoreQuery.Executor
Return the expected types of the projections used by this query, or an empty array if not a projection.- Specified by:
getProjectionTypes
in interfaceStoreQuery.Executor
- Overrides:
getProjectionTypes
in classAbstractStoreQuery.AbstractExecutor
-
getOperation
Description copied from interface:StoreQuery.Executor
Returns the operation this executor is meant to execute.- Specified by:
getOperation
in interfaceStoreQuery.Executor
- Overrides:
getOperation
in classAbstractStoreQuery.AbstractExecutor
- See Also:
-
isAggregate
Description copied from interface:StoreQuery.Executor
Return true if the compiled query is an aggregate.- Specified by:
isAggregate
in interfaceStoreQuery.Executor
- Overrides:
isAggregate
in classAbstractStoreQuery.AbstractExecutor
-
isDistinct
- Specified by:
isDistinct
in interfaceStoreQuery.Executor
- Overrides:
isDistinct
in classAbstractStoreQuery.AbstractExecutor
-
hasGrouping
Description copied from interface:StoreQuery.Executor
Whether the compiled query has grouping.- Specified by:
hasGrouping
in interfaceStoreQuery.Executor
- Overrides:
hasGrouping
in classAbstractStoreQuery.AbstractExecutor
-
getOrderedParameterTypes
Description copied from interface:StoreQuery.Executor
Return a map of parameter names to types. The returnedMap.entrySet()
'sIterator
must return values in the order in which they were declared or used.- Specified by:
getOrderedParameterTypes
in interfaceStoreQuery.Executor
- Overrides:
getOrderedParameterTypes
in classAbstractStoreQuery.AbstractExecutor
-
toParameterArray
Creates a Object[] from the values of the given user parameters.- Specified by:
toParameterArray
in 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.Executor
Return a map ofFieldMetaData
to updateConstant
s, in cases where this query is for a bulk update.- Specified by:
getUpdates
in interfaceStoreQuery.Executor
- Overrides:
getUpdates
in classAbstractStoreQuery.AbstractExecutor
-
getAccessPathMetaDatas
Description copied from interface:StoreQuery.Executor
Return an array of all persistent classes used in this query, or empty array if unknown.- Specified by:
getAccessPathMetaDatas
in interfaceStoreQuery.Executor
- Overrides:
getAccessPathMetaDatas
in classAbstractStoreQuery.AbstractExecutor
-
isPacking
Description copied from interface:StoreQuery.Executor
Return 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:
isPacking
in interfaceStoreQuery.Executor
- Overrides:
isPacking
in classAbstractStoreQuery.AbstractExecutor
-