Package org.apache.openjpa.kernel
Class AbstractStoreQuery.AbstractExecutor
java.lang.Object
org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
- All Implemented Interfaces:
StoreQuery.Executor
- Direct Known Subclasses:
ExpressionStoreQuery.AbstractExpressionExecutor,SQLStoreQuery.SQLExecutor,StoredProcedureQuery.StoredProcedureQueryExecutor
- Enclosing class:
- AbstractStoreQuery
public abstract static class AbstractStoreQuery.AbstractExecutor
extends Object
implements StoreQuery.Executor
Abstract
StoreQuery.Executor that implements most methods as no-ops.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteDelete(StoreQuery q, Object[] params) Deleted the objects that result from the execution of the query, retuning the number of objects that were deleted.executeUpdate(StoreQuery q, Object[] params) Updates the objects that result from the execution of the query, retuning the number of objects that were updated.Return an array of all persistent classes used in this query, or empty array if unknown.If this is not a projection but the candidate results are placed into a result class with an alias, return that alias.boolean[]Return the ordering direction for all ordering clauses, or empty array if none.String[]getDataStoreActions(StoreQuery q, Object[] params, StoreQuery.Range range) Return a description of the commands that will be sent to the datastore in order to execute the query.intReturns the operation this executor is meant to execute.OrderedMap<Object,Class<?>> Return a map of parameter names to types.getOrderingValue(StoreQuery q, Object[] params, Object resultObject, int orderIndex) Extract the value of theorderIndexth ordering expression inQuery#getOrderingClausesfrom the given result object.Return a map of parameter names to types.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.Return the parsed query expressions for our candidate types.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.Class<?>Returns the result class, if any.ResultShape<?>Return a map ofFieldMetaDatato updateConstants, in cases where this query is for a bulk update.booleanWhether the compiled query has grouping.booleanReturn true if the compiled query is an aggregate.booleanbooleanReturn true if this executor packs projections into the result class itself.voidValidate components of query.Methods 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
executeQuery, toParameterArray
-
Constructor Details
-
AbstractExecutor
public AbstractExecutor()
-
-
Method Details
-
executeDelete
Description copied from interface:StoreQuery.ExecutorDeleted the objects that result from the execution of the query, retuning the number of objects that were deleted.- Specified by:
executeDeletein interfaceStoreQuery.Executor
-
executeUpdate
Description copied from interface:StoreQuery.ExecutorUpdates the objects that result from the execution of the query, retuning the number of objects that were updated.- Specified by:
executeUpdatein interfaceStoreQuery.Executor
-
getDataStoreActions
Description copied from interface:StoreQuery.ExecutorReturn a description of the commands that will be sent to the datastore in order to execute the query.- Specified by:
getDataStoreActionsin interfaceStoreQuery.Executor
-
validate
Description copied from interface:StoreQuery.ExecutorValidate components of query.- Specified by:
validatein interfaceStoreQuery.Executor
-
getQueryExpressions
Description copied from interface:StoreQuery.ExecutorReturn the parsed query expressions for our candidate types. The expressions are available only after query has been parsed.- Specified by:
getQueryExpressionsin interfaceStoreQuery.Executor
-
getResultShape
- Specified by:
getResultShapein interfaceStoreQuery.Executor
-
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
-
getOrderingValue
Description copied from interface:StoreQuery.ExecutorExtract the value of theorderIndexth ordering expression inQuery#getOrderingClausesfrom the given result object. The result object will be an object from the result object provider returned fromStoreQuery.Executor.executeQuery(org.apache.openjpa.kernel.StoreQuery, java.lang.Object[], org.apache.openjpa.kernel.StoreQuery.Range). This method is used when several result lists have to be merged in memory. If this exeuctor's parent query supports executors on abstract or interface classes, this method will not be used.- Specified by:
getOrderingValuein interfaceStoreQuery.Executor- See Also:
-
getAscending
Description copied from interface:StoreQuery.ExecutorReturn the ordering direction for all ordering clauses, or empty array if none.- Specified by:
getAscendingin interfaceStoreQuery.Executor
-
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
-
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
-
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
-
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
-
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
-
getOperation
Description copied from interface:StoreQuery.ExecutorReturns the operation this executor is meant to execute.- Specified by:
getOperationin interfaceStoreQuery.Executor- See Also:
-
isAggregate
Description copied from interface:StoreQuery.ExecutorReturn true if the compiled query is an aggregate.- Specified by:
isAggregatein interfaceStoreQuery.Executor
-
isDistinct
- Specified by:
isDistinctin interfaceStoreQuery.Executor
-
hasGrouping
Description copied from interface:StoreQuery.ExecutorWhether the compiled query has grouping.- Specified by:
hasGroupingin interfaceStoreQuery.Executor
-
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
-
getParameterTypes
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.
Warning: Deprecated. Use StoreQuery.Executor.getOrderedParameterTypes(StoreQuery) instead.- Specified by:
getParameterTypesin interfaceStoreQuery.Executor
-
getResultClass
Description copied from interface:StoreQuery.ExecutorReturns the result class, if any.- Specified by:
getResultClassin interfaceStoreQuery.Executor
-
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
-