Package org.apache.openjpa.kernel
Class ExpressionStoreQuery.DataStoreExecutor
- java.lang.Object
-
- org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
-
- org.apache.openjpa.kernel.ExpressionStoreQuery.AbstractExpressionExecutor
-
- org.apache.openjpa.kernel.ExpressionStoreQuery.DataStoreExecutor
-
- All Implemented Interfaces:
java.io.Serializable,StoreQuery.Executor
- Enclosing class:
- ExpressionStoreQuery
public static class ExpressionStoreQuery.DataStoreExecutor extends ExpressionStoreQuery.AbstractExpressionExecutor implements StoreQuery.Executor, java.io.Serializable
The DataStoreExecutor executes the query against the implementation's overriddenexecuteQuery(org.apache.openjpa.kernel.StoreQuery, java.lang.Object[], org.apache.openjpa.kernel.StoreQuery.Range)method.- Author:
- Marc Prud'hommeaux
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataStoreExecutor(ExpressionStoreQuery q, ClassMetaData meta, boolean subclasses, ExpressionParser parser, java.lang.Object parsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.NumberexecuteDelete(StoreQuery q, java.lang.Object[] params)Deleted the objects that result from the execution of the query, retuning the number of objects that were deleted.ResultObjectProviderexecuteQuery(StoreQuery q, java.lang.Object[] params, StoreQuery.Range range)Return the result of executing this query with the given parameter values.java.lang.NumberexecuteUpdate(StoreQuery q, java.lang.Object[] params)Updates the objects that result from the execution of the query, retuning the number of objects that were updated.java.lang.String[]getDataStoreActions(StoreQuery q, java.lang.Object[] params, StoreQuery.Range range)Return a description of the commands that will be sent to the datastore in order to execute the query.java.lang.ObjectgetOrderingValue(StoreQuery q, java.lang.Object[] params, java.lang.Object resultObject, int orderIndex)Extract the value of theorderIndexth ordering expression inQuery#getOrderingClausesfrom the given result object.java.lang.Class[]getProjectionTypes(StoreQuery q)Return the expected types of the projections used by this query, or an empty array if not a projection.QueryExpressions[]getQueryExpressions()Return the parsed query expressions for our candidate types.-
Methods inherited from class org.apache.openjpa.kernel.ExpressionStoreQuery.AbstractExpressionExecutor
assertNotContainer, getAccessPathMetaDatas, getAlias, getAscending, getOperation, getOrderedParameterTypes, getProjectionAliases, getRange, getResultClass, getResultShape, getUpdates, hasGrouping, isAggregate, isDistinct, isPacking, toParameterArray, validate
-
Methods inherited from class org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
getParameterTypes
-
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
getAccessPathMetaDatas, getAlias, getAscending, getOperation, getOrderedParameterTypes, getParameterTypes, getProjectionAliases, getRange, getResultClass, getResultShape, getUpdates, hasGrouping, isAggregate, isDistinct, isPacking, toParameterArray, validate
-
-
-
-
Constructor Detail
-
DataStoreExecutor
public DataStoreExecutor(ExpressionStoreQuery q, ClassMetaData meta, boolean subclasses, ExpressionParser parser, java.lang.Object parsed)
-
-
Method Detail
-
getQueryExpressions
public QueryExpressions[] 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- Overrides:
getQueryExpressionsin classAbstractStoreQuery.AbstractExecutor
-
executeQuery
public ResultObjectProvider executeQuery(StoreQuery q, java.lang.Object[] params, StoreQuery.Range range)
Description copied from interface:StoreQuery.ExecutorReturn the result of executing this query with the given parameter values. If this query is a projection and this executor does not pack results itself, each element of the returned result object provider should be an object array containing the projection values.- Specified by:
executeQueryin interfaceStoreQuery.Executor- See Also:
StoreQuery.Executor.isPacking(org.apache.openjpa.kernel.StoreQuery)
-
executeDelete
public java.lang.Number executeDelete(StoreQuery q, java.lang.Object[] params)
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- Overrides:
executeDeletein classAbstractStoreQuery.AbstractExecutor
-
executeUpdate
public java.lang.Number executeUpdate(StoreQuery q, java.lang.Object[] params)
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- Overrides:
executeUpdatein classAbstractStoreQuery.AbstractExecutor
-
getDataStoreActions
public java.lang.String[] getDataStoreActions(StoreQuery q, java.lang.Object[] params, StoreQuery.Range range)
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- Overrides:
getDataStoreActionsin classAbstractStoreQuery.AbstractExecutor
-
getOrderingValue
public java.lang.Object getOrderingValue(StoreQuery q, java.lang.Object[] params, java.lang.Object resultObject, int orderIndex)
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- Overrides:
getOrderingValuein classAbstractStoreQuery.AbstractExecutor- See Also:
StoreQuery.supportsAbstractExecutors()
-
getProjectionTypes
public java.lang.Class[] getProjectionTypes(StoreQuery q)
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 classExpressionStoreQuery.AbstractExpressionExecutor
-
-