Package org.apache.openjpa.jdbc.kernel
Class PreparedSQLStoreQuery.PreparedSQLExecutor
- java.lang.Object
 - 
- org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
 - 
- org.apache.openjpa.kernel.ExpressionStoreQuery.AbstractExpressionExecutor
 - 
- org.apache.openjpa.jdbc.kernel.PreparedSQLStoreQuery.PreparedSQLExecutor
 
 
 
 
- 
- All Implemented Interfaces:
 StoreQuery.Executor
- Enclosing class:
 - PreparedSQLStoreQuery
 
public static class PreparedSQLStoreQuery.PreparedSQLExecutor extends ExpressionStoreQuery.AbstractExpressionExecutor
Executor of a prepared query uses the QueryExpressions of the original query available via the PreparedQuery. 
- 
- 
Constructor Summary
Constructors Constructor Description PreparedSQLExecutor(PreparedSQLStoreQuery q, ClassMetaData candidate) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultObjectProviderexecuteQuery(StoreQuery q, Object[] params, StoreQuery.Range range)Return the result of executing this query with the given parameter values.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.Object[]toParameterArray(StoreQuery q, Map userParams)Convert given userParams to an array whose ordering matches as per expected during executeXXX() methods.- 
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, validate 
- 
Methods inherited from class org.apache.openjpa.kernel.AbstractStoreQuery.AbstractExecutor
executeDelete, executeUpdate, getDataStoreActions, getOrderingValue, 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
executeDelete, executeUpdate, getDataStoreActions, getOrderingValue, getParameterTypes 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
PreparedSQLExecutor
public PreparedSQLExecutor(PreparedSQLStoreQuery q, ClassMetaData candidate)
 
 - 
 
- 
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
 
- 
getProjectionTypes
public 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
 
- 
executeQuery
public ResultObjectProvider executeQuery(StoreQuery q, 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. 
- 
toParameterArray
public Object[] toParameterArray(StoreQuery q, Map userParams)
Convert given userParams to an array whose ordering matches as per expected during executeXXX() methods. The given userParams is already re-parameterized, so this method have to merely copy the given Map values.- Specified by:
 toParameterArrayin interfaceStoreQuery.Executor- Overrides:
 toParameterArrayin classExpressionStoreQuery.AbstractExpressionExecutor- Returns:
 - array with parameter values ordered in the same way as this receiver's executeXXX() method expects.
 - See Also:
 PreparedQueryImpl.reparametrize(Map, org.apache.openjpa.kernel.Broker)
 
 - 
 
 -