public static interface StoreQuery.Executor
executeQuery(org.apache.openjpa.kernel.StoreQuery, java.lang.Object[], org.apache.openjpa.kernel.StoreQuery.Range)
method will be called before other methods,
though this is not guaranteed.Modifier and Type | Method and Description |
---|---|
Number |
executeDelete(StoreQuery q,
Object[] params)
Deleted the objects that result from the execution of the
query, retuning the number of objects that were deleted.
|
ResultObjectProvider |
executeQuery(StoreQuery q,
Object[] params,
StoreQuery.Range range)
Return the result of executing this query with the given parameter
values.
|
Number |
executeUpdate(StoreQuery q,
Object[] params)
Updates the objects that result from the execution of the
query, retuning the number of objects that were updated.
|
ClassMetaData[] |
getAccessPathMetaDatas(StoreQuery q)
Return an array of all persistent classes used in this query, or
empty array if unknown.
|
String |
getAlias(StoreQuery q)
If this is not a projection but the candidate results are placed
into a result class with an alias, return that alias.
|
boolean[] |
getAscending(StoreQuery q)
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.
|
int |
getOperation(StoreQuery q)
Returns the operation this executor is meant to execute.
|
OrderedMap<Object,Class<?>> |
getOrderedParameterTypes(StoreQuery q)
Return a map of parameter names to types.
|
Object |
getOrderingValue(StoreQuery q,
Object[] params,
Object resultObject,
int orderIndex)
Extract the value of the
orderIndex th ordering
expression in Query#getOrderingClauses from the
given result object. |
org.apache.commons.collections.map.LinkedMap |
getParameterTypes(StoreQuery q)
Deprecated.
|
String[] |
getProjectionAliases(StoreQuery q)
Return the alias for each projection element, or empty array
if not a projection.
|
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.
|
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.
|
Class<?> |
getResultClass(StoreQuery q)
Returns the result class, if any.
|
ResultShape<?> |
getResultShape(StoreQuery q) |
Map<FieldMetaData,Value> |
getUpdates(StoreQuery q)
Return a map of
FieldMetaData to update
Constant s, in cases where this query is for a bulk update. |
boolean |
hasGrouping(StoreQuery q)
Whether the compiled query has grouping.
|
boolean |
isAggregate(StoreQuery q)
Return true if the compiled query is an aggregate.
|
boolean |
isDistinct(StoreQuery q) |
boolean |
isPacking(StoreQuery q)
Return true if this executor packs projections into the result
class itself.
|
Object[] |
toParameterArray(StoreQuery q,
Map<?,?> userParams)
Return an array from the given user parameter values.
|
void |
validate(StoreQuery q)
Validate components of query.
|
ResultObjectProvider executeQuery(StoreQuery q, Object[] params, StoreQuery.Range range)
lrs
- true if the query result should be treated as a
large result set, assuming the query is not an
aggregate and does not have groupingisPacking(org.apache.openjpa.kernel.StoreQuery)
Number executeDelete(StoreQuery q, Object[] params)
Number executeUpdate(StoreQuery q, Object[] params)
String[] getDataStoreActions(StoreQuery q, Object[] params, StoreQuery.Range range)
void validate(StoreQuery q)
void getRange(StoreQuery q, Object[] params, StoreQuery.Range range)
Object getOrderingValue(StoreQuery q, Object[] params, Object resultObject, int orderIndex)
orderIndex
th ordering
expression in Query#getOrderingClauses
from the
given result object. The result object will be an object from
the result object provider returned from 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.boolean[] getAscending(StoreQuery q)
boolean isPacking(StoreQuery q)
String getAlias(StoreQuery q)
String[] getProjectionAliases(StoreQuery q)
Class<?>[] getProjectionTypes(StoreQuery q)
ClassMetaData[] getAccessPathMetaDatas(StoreQuery q)
int getOperation(StoreQuery q)
QueryOperations
boolean isAggregate(StoreQuery q)
boolean isDistinct(StoreQuery q)
boolean hasGrouping(StoreQuery q)
OrderedMap<Object,Class<?>> getOrderedParameterTypes(StoreQuery q)
Map.entrySet()
's Iterator
must return values in the
order in which they were declared or used.@Deprecated org.apache.commons.collections.map.LinkedMap getParameterTypes(StoreQuery q)
Map.entrySet()
's Iterator
must return values in the
order in which they were declared or used.Object[] toParameterArray(StoreQuery q, Map<?,?> userParams)
Class<?> getResultClass(StoreQuery q)
ResultShape<?> getResultShape(StoreQuery q)
Map<FieldMetaData,Value> getUpdates(StoreQuery q)
FieldMetaData
to update
Constant
s, in cases where this query is for a bulk update.QueryExpressions[] getQueryExpressions()
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.