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 ResultObjectProvider
executeQuery(StoreQuery q, java.lang.Object[] params, StoreQuery.Range range)
Return the result of executing this query with the given parameter values.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.java.lang.Object[]
toParameterArray(StoreQuery q, java.util.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.Executor
Return the parsed query expressions for our candidate types. The expressions are available only after query has been parsed.- Specified by:
getQueryExpressions
in interfaceStoreQuery.Executor
- Overrides:
getQueryExpressions
in classAbstractStoreQuery.AbstractExecutor
-
getProjectionTypes
public java.lang.Class[] getProjectionTypes(StoreQuery q)
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 classExpressionStoreQuery.AbstractExpressionExecutor
-
executeQuery
public ResultObjectProvider executeQuery(StoreQuery q, java.lang.Object[] params, StoreQuery.Range range)
Description copied from interface:StoreQuery.Executor
Return 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 java.lang.Object[] toParameterArray(StoreQuery q, java.util.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:
toParameterArray
in interfaceStoreQuery.Executor
- Overrides:
toParameterArray
in 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)
-
-