public abstract static class AbstractStoreQuery.AbstractExecutor extends Object implements StoreQuery.Executor
Executor
that implements most methods as no-ops.Constructor and Description |
---|
AbstractExecutor() |
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.
|
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.collections4.map.LinkedMap |
getParameterTypes(StoreQuery q)
Return a map of parameter names to types.
|
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.
|
void |
validate(StoreQuery q)
Validate components of query.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeQuery, toParameterArray
public Number executeDelete(StoreQuery q, Object[] params)
StoreQuery.Executor
executeDelete
in interface StoreQuery.Executor
public Number executeUpdate(StoreQuery q, Object[] params)
StoreQuery.Executor
executeUpdate
in interface StoreQuery.Executor
public String[] getDataStoreActions(StoreQuery q, Object[] params, StoreQuery.Range range)
StoreQuery.Executor
getDataStoreActions
in interface StoreQuery.Executor
public void validate(StoreQuery q)
StoreQuery.Executor
validate
in interface StoreQuery.Executor
public QueryExpressions[] getQueryExpressions()
StoreQuery.Executor
getQueryExpressions
in interface StoreQuery.Executor
public ResultShape<?> getResultShape(StoreQuery q)
getResultShape
in interface StoreQuery.Executor
public void getRange(StoreQuery q, Object[] params, StoreQuery.Range range)
StoreQuery.Executor
getRange
in interface StoreQuery.Executor
public Object getOrderingValue(StoreQuery q, Object[] params, Object resultObject, int orderIndex)
StoreQuery.Executor
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 StoreQuery.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.getOrderingValue
in interface StoreQuery.Executor
StoreQuery.supportsAbstractExecutors()
public boolean[] getAscending(StoreQuery q)
StoreQuery.Executor
getAscending
in interface StoreQuery.Executor
public boolean isPacking(StoreQuery q)
StoreQuery.Executor
isPacking
in interface StoreQuery.Executor
public String getAlias(StoreQuery q)
StoreQuery.Executor
getAlias
in interface StoreQuery.Executor
public String[] getProjectionAliases(StoreQuery q)
StoreQuery.Executor
getProjectionAliases
in interface StoreQuery.Executor
public Class<?>[] getProjectionTypes(StoreQuery q)
StoreQuery.Executor
getProjectionTypes
in interface StoreQuery.Executor
public ClassMetaData[] getAccessPathMetaDatas(StoreQuery q)
StoreQuery.Executor
getAccessPathMetaDatas
in interface StoreQuery.Executor
public int getOperation(StoreQuery q)
StoreQuery.Executor
getOperation
in interface StoreQuery.Executor
QueryOperations
public boolean isAggregate(StoreQuery q)
StoreQuery.Executor
isAggregate
in interface StoreQuery.Executor
public boolean isDistinct(StoreQuery q)
isDistinct
in interface StoreQuery.Executor
public boolean hasGrouping(StoreQuery q)
StoreQuery.Executor
hasGrouping
in interface StoreQuery.Executor
public OrderedMap<Object,Class<?>> getOrderedParameterTypes(StoreQuery q)
StoreQuery.Executor
Map.entrySet()
's Iterator
must return values in the
order in which they were declared or used.getOrderedParameterTypes
in interface StoreQuery.Executor
public org.apache.commons.collections4.map.LinkedMap getParameterTypes(StoreQuery q)
StoreQuery.Executor
Map.entrySet()
's Iterator
must return values in the
order in which they were declared or used.getParameterTypes
in interface StoreQuery.Executor
public Class<?> getResultClass(StoreQuery q)
StoreQuery.Executor
getResultClass
in interface StoreQuery.Executor
public Map<FieldMetaData,Value> getUpdates(StoreQuery q)
StoreQuery.Executor
FieldMetaData
to update
Constant
s, in cases where this query is for a bulk update.getUpdates
in interface StoreQuery.Executor
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.