T
- Type of the candidate of this querypublic abstract class Query<T> extends Object implements Serializable, ExecutionContextListener
Modifier and Type | Class and Description |
---|---|
static class |
Query.QueryType |
static class |
Query.SubqueryDefinition
Simple representation of a subquery, its candidate, params and variables.
|
Modifier and Type | Field and Description |
---|---|
protected Class<T> |
candidateClass
The candidate class for this query.
|
protected String |
candidateClassName
Name of the candidate class (used when specified via Single-String).
|
protected ClassLoaderResolver |
clr |
protected QueryCompilation |
compilation
Query compilation (when using the generic query compiler).
|
protected ExecutionContext |
ec |
protected String |
explicitParameters
Any explicit parameters defined for this query, comma separated.
|
protected String |
explicitVariables
Any explicit variables defined for this query, semicolon separated.
|
static String |
EXTENSION_CHECK_UNUSED_PARAMETERS |
static String |
EXTENSION_CLOSE_RESULTS_AT_EC_CLOSE |
static String |
EXTENSION_COMPILATION_CACHED |
static String |
EXTENSION_EVALUATE_IN_MEMORY |
static String |
EXTENSION_EXCLUDE_SUBCLASSES
Extension for the benefit of JPQL so that we can exclude subclasses (not possible with JPA API).
|
static String |
EXTENSION_FLUSH_BEFORE_EXECUTION |
static String |
EXTENSION_JDOQL_STRICT |
static String |
EXTENSION_JPQL_STRICT |
static String |
EXTENSION_LOAD_RESULTS_AT_COMMIT |
static String |
EXTENSION_MULTITHREAD |
static String |
EXTENSION_RESULT_CACHE_TYPE |
static String |
EXTENSION_RESULT_SIZE_METHOD |
static String |
EXTENSION_RESULTS_CACHED |
static String |
EXTENSION_SQL_SYNTAX_CHECKS |
static String |
EXTENSION_USE_FETCH_PLAN |
protected Map<String,Object> |
extensions
Any extensions
|
protected String |
filter
The filter for the query.
|
protected String |
from
From clause of the query (optional).
|
protected long |
fromInclNo
Query result range start position (inclusive).
|
protected String |
fromInclParam
Query result range lower limit (inclusive) as a parameter name.
|
protected String |
grouping
Grouping clause for the query, for use with aggregate expressions.
|
protected String |
having
Having clause for the query
|
protected boolean |
ignoreCache
Whether to ignore dirty instances in the query.
|
protected Map |
implicitParameters
Map of implicit parameters, keyed by the name/number.
|
protected String |
imports
Any import declarations for the types used in the query, semicolon separated.
|
protected Map |
inputParameters |
protected String |
insertFields
INSERT fields of a query (optional).
|
protected String |
insertSelectQuery
INSERT select query (optional).
|
static String |
LANGUAGE_JDOQL |
static String |
LANGUAGE_JPQL |
static String |
LANGUAGE_SQL |
protected String |
ordering
Ordering clause for the query, governing the order objects are returned.
|
protected String[] |
parameterNames
Array of (explicit) parameter names.
|
protected Imports |
parsedImports
The imports definition.
|
protected Set<QueryResult> |
queryResults
All query results obtained from this query.
|
protected String |
range
String form of the query result range.
|
protected String |
result
Specification of the result of the query e.g aggregates etc.
|
protected Class |
resultClass
User-defined class that best represents the results of a query.
|
protected String |
resultClassName
Temporary variable for the name of the result class (may need resolving using imports).
|
protected boolean |
resultDistinct
Whether the results are marked as distinct.
|
protected StoreManager |
storeMgr |
protected boolean |
subclasses
Whether to allow subclasses of the candidate class be returned.
|
protected Map<String,Query.SubqueryDefinition> |
subqueries
Any subqueries, keyed by the variable name that they represent.
|
protected Map<Thread,Object> |
tasks
Currently executing object for this query, keyed by the thread, to allow for cancellation.
|
protected long |
toExclNo
Query result range end position (exclusive).
|
protected String |
toExclParam
Query result range upper limit (exclusive) as a parameter name.
|
protected Query.QueryType |
type
Type of query.
|
protected boolean |
unique
Whether to return single value, or collection from the query.
|
protected boolean |
unmodifiable
Whether the query can be modified
|
protected String |
update
UPDATE clause of a query (optional).
|
Constructor and Description |
---|
Query(StoreManager storeMgr,
ExecutionContext ec)
Constructs a new query instance that uses the given ExecutionContext.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtension(String key,
Object value)
Add a vendor-specific extension to this query.
|
void |
addSubquery(Query sub,
String variableDecl,
String candidateExpr,
Map paramMap)
Method to add a subquery to this query.
|
protected void |
applyImplicitParameterValueToCompilation(String name,
Object value)
Convenience method to apply an implicit parameter value to the compilation symbol table.
|
protected boolean |
applyImplicitParameterValueToSubqueries(String name,
Object value,
QueryCompilation comp) |
protected void |
assertIsModifiable()
Method to throw an exception if the query is currently not modifiable.
|
protected void |
assertIsOpen() |
protected void |
assertSupportsCancel()
Method that will throw an
UnsupportedOperationException if the query implementation doesn't
support cancelling queries. |
void |
cancel()
Method to cancel any currently running queries.
|
void |
cancel(Thread thread)
Method to cancel a running query in the specified Thread.
|
protected boolean |
cancelTaskObject(Object obj)
Method to perform the cancellation of a query task.
|
protected void |
checkForMissingParameters(Map parameterValues)
Method to check for any missing parameters that the query compilation is expecting but which aren't
supplied to execute().
|
protected void |
checkParameterTypesAgainstCompilation(Map parameterValues)
Method to do checks of the input parameters with respect to their types being consistent
with the types of the parameters in the compilation.
|
boolean |
checkUnusedParameters()
Whether the query compilation(s) should check for unused parameters.
|
void |
close(Object queryResult)
Close a query result and release any resources associated with it.
|
void |
closeAll()
Close all query results associated with this Query instance,
and release all resources associated with them.
|
void |
compile()
Verify the elements of the query and provide a hint to the query to prepare and optimize an execution plan.
|
protected abstract void |
compileInternal(Map parameterValues)
Method to compile the query.
|
void |
declareExplicitParameters(String parameters)
Method to define the explicit parameters.
|
void |
declareExplicitVariables(String variables)
Method to define the explicit variables for the query.
|
void |
declareImports(String imports)
Set the import statements to be used to identify the fully qualified name of variables or parameters.
|
protected Symbol |
deepFindSymbolForParameterInCompilation(QueryCompilation compilation,
Object paramKey) |
long |
deletePersistentAll()
Method to delete all objects found by this query, catering for cascade changes and updates to in-memory objects.
|
long |
deletePersistentAll(Map parameters)
Method to delete all objects found by this query, catering for cascade changes and updates to in-memory objects.
|
long |
deletePersistentAll(Object[] parameterValues)
Method to delete all objects found by this query, catering for cascade changes and updates to in-memory objects.
|
protected void |
deregisterTask() |
protected void |
discardCompiled()
Utility to remove any previous compilation of this Query.
|
boolean |
equals(Object obj)
Equality operator.
|
Object |
execute()
Execute the query and return the filtered results.
|
protected Object |
executeQuery(Map parameters)
Method to execute the actual query.
|
Object |
executeWithArray(Object[] parameterValues)
Execute the query and return the filtered results using the array of parameters.
|
Object |
executeWithMap(Map parameters)
Execute the query and return the filtered results using the map of parameters.
|
void |
executionContextClosing(ExecutionContext ec)
Method called when the specified ExecutionContext is closing.
|
boolean |
getBooleanExtensionProperty(String name,
boolean resultIfNotSet)
Convenience accessor to return whether an extension is set (or whether the persistence property
of the same name is set), and what is its boolean value.
|
Class<T> |
getCandidateClass()
Accessor for the class of the candidate instances of the query.
|
protected AbstractClassMetaData |
getCandidateClassMetaData() |
String |
getCandidateClassName()
Accessor for the candidate class name.
|
QueryCompilation |
getCompilation()
Accessor for the query compilation.
|
Integer |
getDatastoreReadTimeoutMillis()
Convenience accessor for the datastore read timeout (milliseconds).
|
Integer |
getDatastoreWriteTimeoutMillis()
Convenience accessor for the datastore write timeout (milliseconds).
|
ExecutionContext |
getExecutionContext()
Accessor for the Execution Context associated with this Query.
|
String |
getExplicitParametersDeclaration()
Accessor for the explicit parameters declaration.
|
String |
getExplicitVariablesDeclaration()
Accessor for the explicit variables declaration.
|
Object |
getExtension(String key)
Accessor for the value of an extension for this query.
|
Map<String,Object> |
getExtensions()
Accessor for the extensions defined for this query.
|
FetchPlan |
getFetchPlan()
This method retrieves the fetch plan associated with the Query.
|
String |
getFilter()
Accessor for the filter specification.
|
String |
getFrom()
Accessor for the FROM clause of the query.
|
String |
getGrouping()
Accessor for the grouping string for the query.
|
String |
getHaving()
Accessor for the having string for the query.
|
boolean |
getIgnoreCache()
Accessor for the ignoreCache option setting.
|
Map |
getImplicitParameters()
Accessor for the implicit parameters.
|
String |
getImportsDeclaration()
Accessor for the imports declaration.
|
Map |
getInputParameters()
Accessor for the input parameters for this query.
|
String |
getInsertFields()
Accessor for the INSERT fields of the query (if any).
|
String |
getInsertSelectQuery()
Accessor for the INSERT select query (if any).
|
String |
getLanguage()
Accessor for the query language.
|
Object |
getNativeQuery()
Method returning the native query performed by this query (if the query has been compiled, and
if the datastore plugin supports this).
|
String |
getOrdering()
Accessor for the ordering string for the query.
|
protected Map |
getParameterMapForValues(Object[] parameterValues)
Convenience method to convert the input parameters into a parameter map keyed by the parameter
name.
|
Imports |
getParsedImports()
Accessor for the parsed imports.
|
QueryManager |
getQueryManager() |
String |
getRange()
Accessor for the range specification string.
|
long |
getRangeFromIncl()
Accessor for the range lower limit (inclusive).
|
String |
getRangeFromInclParam()
Accessor for the range lower limit parameter (inclusive).
|
long |
getRangeToExcl()
Accessor for the range upper limit (exclusive).
|
String |
getRangeToExclParam()
Accessor for the range upper limit parameter (exclusive).
|
String |
getResult()
Accessor for the result specification string.
|
Class |
getResultClass()
Accessor for the result class.
|
String |
getResultClassName() |
boolean |
getResultDistinct()
Accessor for whether the results are distinct.
|
Boolean |
getSerializeRead()
Accessor for whether to serialise (lock) any read objects retrieved from this query.
|
StoreManager |
getStoreManager()
Accessor for the StoreManager associated with this Query.
|
String |
getStringExtensionProperty(String name,
String resultIfNotSet)
Convenience accessor to return whether an extension is set (or whether the persistence property
of the same name is set), and what is its String value.
|
Query.SubqueryDefinition |
getSubqueryForVariable(String variableName)
Accessor for the subquery for the supplied variable.
|
Set<String> |
getSupportedExtensions()
Method to return the names of the extensions supported by this query.
|
Query.QueryType |
getType()
Accessor for the query type.
|
String |
getUpdate()
Accessor for the UPDATE clause of the query (if any).
|
int |
hashCode() |
boolean |
hasSubqueryForVariable(String variableName)
Accessor for whether there is a subquery for the specified variable name.
|
protected boolean |
isCompiled()
Method to return if the query is compiled.
|
boolean |
isSubclasses()
Accessor for whether this query includes subclasses
|
boolean |
isUnique()
Accessor for whether the query results are unique.
|
boolean |
isUnmodifiable()
Accessor for unmodifiable.
|
protected long |
performDeletePersistentAll(Map parameters)
Execute the query to delete persistent objects.
|
protected abstract Object |
performExecute(Map parameters)
Method to actually execute the query.
|
protected void |
prepareDatastore()
Convenience method that will flush any outstanding updates to the datastore.
|
boolean |
processesRangeInDatastoreQuery()
Method to return if the datastore query will check any range constraints of this query.
|
protected void |
registerTask(Object taskObject) |
Class |
resolveClassDeclaration(String classDecl)
Utility to resolve the declaration to a particular class.
|
void |
setCacheResults(boolean cache)
Whether this query should cache the results from the times it is ran.
|
void |
setCandidateClass(Class<T> candidateClass)
Mutator for the class of the candidate instances of the query.
|
void |
setCandidateClassName(String candidateClassName)
Convenience method to set the name of the candidate class.
|
abstract void |
setCandidates(Collection<T> pcs)
Set the candidate Collection to query.
|
abstract void |
setCandidates(Extent<T> pcs)
Set the candidate Extent to query.
|
void |
setCompilation(QueryCompilation compilation)
Method to set the generic compilation for this query.
|
void |
setDatastoreReadTimeoutMillis(Integer timeout)
Mutator to set the datastore read timeout for this query.
|
void |
setDatastoreWriteTimeoutMillis(Integer timeout)
Mutator to set the datastore write timeout for this query.
|
void |
setExtensions(Map<String,Object> extensions)
Set multiple extensions, or use null to clear extensions.
|
void |
setFetchPlan(FetchPlan fp)
Mutator for the FetchPlan of the query.
|
void |
setFilter(String filter)
Set the filter for the query.
|
void |
setFrom(String from)
Set the candidates to the query.
|
void |
setGrouping(String grouping)
Set the grouping specification for the result Collection.
|
void |
setHaving(String having)
Set the having specification for the result Collection.
|
void |
setIgnoreCache(boolean ignoreCache)
Set the ignoreCache option.
|
void |
setImplicitParameter(int position,
Object value)
Method to set the value of a numbered implicit parameter where known before execution.
|
void |
setImplicitParameter(String name,
Object value)
Method to set the value of a named implicit parameter where known before execution.
|
void |
setInsertFields(String insertFields)
Set the INSERT fields of the query.
|
void |
setInsertSelectQuery(String query)
Set the INSERT select query.
|
void |
setOrdering(String ordering)
Set the ordering specification for the result Collection.
|
void |
setRange(long fromIncl,
long toExcl)
Set the range of the results.
|
void |
setRange(String range)
Set the range of the results.
|
void |
setResult(String result)
Set the result for the results.
|
void |
setResultClass(Class result_cls)
Set the result class for the results.
|
void |
setResultClassName(String resultClassName)
Method to set the result class name, direct from a single-string query.
|
void |
setResultDistinct(boolean distinct)
Mark the result as distinct (or not).
|
void |
setResultMetaData(QueryResultMetaData qrmd)
Method to set the MetaData defining the result.
|
void |
setSerializeRead(Boolean serialize)
Mutator for whether to serialise (lock) any read objects in this query.
|
void |
setSubclasses(boolean subclasses)
Mutator for whether this query includes subclasses
|
void |
setType(Query.QueryType type)
Mutator to set the query type.
|
void |
setUnique(boolean unique)
Set the uniqueness of the results.
|
void |
setUnmodifiable()
Mutator for unmodifiable.
|
void |
setUpdate(String update)
Set the UPDATE clause of the query.
|
protected boolean |
shouldReturnSingleRow()
Convenience method to return whether the query should return a single row.
|
protected boolean |
supportsTimeout()
Convenience method for whether this query supports timeouts.
|
boolean |
useCaching()
Whether the query compilation(s) should be cached.
|
protected boolean |
useFetchPlan()
Convenience accessor for whether to use the fetch plan with this query.
|
boolean |
useResultsCaching()
Whether the results of the query should be cached.
|
public static final String LANGUAGE_JDOQL
public static final String LANGUAGE_JPQL
public static final String LANGUAGE_SQL
public static final String EXTENSION_FLUSH_BEFORE_EXECUTION
public static final String EXTENSION_USE_FETCH_PLAN
public static final String EXTENSION_RESULT_SIZE_METHOD
public static final String EXTENSION_LOAD_RESULTS_AT_COMMIT
public static final String EXTENSION_COMPILATION_CACHED
public static final String EXTENSION_RESULTS_CACHED
public static final String EXTENSION_EVALUATE_IN_MEMORY
public static final String EXTENSION_CHECK_UNUSED_PARAMETERS
public static final String EXTENSION_EXCLUDE_SUBCLASSES
public static final String EXTENSION_MULTITHREAD
public static final String EXTENSION_RESULT_CACHE_TYPE
public static final String EXTENSION_CLOSE_RESULTS_AT_EC_CLOSE
public static final String EXTENSION_JDOQL_STRICT
public static final String EXTENSION_JPQL_STRICT
public static final String EXTENSION_SQL_SYNTAX_CHECKS
protected final transient StoreManager storeMgr
protected transient ExecutionContext ec
protected final transient ClassLoaderResolver clr
protected Query.QueryType type
protected String candidateClassName
protected boolean subclasses
protected transient String from
protected transient String update
protected transient String insertFields
protected transient String insertSelectQuery
protected String result
protected boolean resultDistinct
protected boolean unique
protected Class resultClass
protected String resultClassName
protected String filter
protected String ordering
protected String grouping
protected String having
protected String imports
protected String explicitVariables
protected String explicitParameters
protected String range
protected long fromInclNo
protected long toExclNo
protected String fromInclParam
protected String toExclParam
protected boolean unmodifiable
protected boolean ignoreCache
protected Map<String,Query.SubqueryDefinition> subqueries
protected transient Map implicitParameters
protected transient Imports parsedImports
protected transient String[] parameterNames
protected transient QueryCompilation compilation
protected transient Set<QueryResult> queryResults
protected transient Map<Thread,Object> tasks
protected Map inputParameters
public Query(StoreManager storeMgr, ExecutionContext ec)
storeMgr
- Store Manager used for this queryec
- execution contextpublic void setCacheResults(boolean cache)
cache
- Whether to cache the query results obtained by an execute() call.public String getLanguage()
protected void discardCompiled()
public void setCompilation(QueryCompilation compilation)
compilation
- The compilationpublic boolean equals(Object obj)
public Query.QueryType getType()
public void setType(Query.QueryType type)
type
- The query typepublic StoreManager getStoreManager()
public ExecutionContext getExecutionContext()
public void executionContextClosing(ExecutionContext ec)
ExecutionContextListener
executionContextClosing
in interface ExecutionContextListener
ec
- The ExecutionContextpublic void addExtension(String key, Object value)
key
- the extension keyvalue
- the extension valuepublic void setExtensions(Map<String,Object> extensions)
extensions
- Any extensionsaddExtension(java.lang.String, java.lang.Object)
public Object getExtension(String key)
key
- The keypublic Map<String,Object> getExtensions()
public boolean getBooleanExtensionProperty(String name, boolean resultIfNotSet)
name
- The extension/property nameresultIfNotSet
- The value to return if there is neither an extension nor a persistence property of the same namepublic String getStringExtensionProperty(String name, String resultIfNotSet)
name
- The extension/property nameresultIfNotSet
- The value to return if there is neither an extension nor a persistence
property of the same namepublic Set<String> getSupportedExtensions()
public FetchPlan getFetchPlan()
public void setFetchPlan(FetchPlan fp)
fp
- The FetchPlanpublic void setUpdate(String update)
update
- the update clausepublic String getUpdate()
public void setInsertFields(String insertFields)
insertFields
- the fields to insertpublic String getInsertFields()
public void setInsertSelectQuery(String query)
query
- the query to use for insertingpublic String getInsertSelectQuery()
public Class<T> getCandidateClass()
public void setCandidateClass(Class<T> candidateClass)
candidateClass
- the Class of the candidate instances.public void setCandidateClassName(String candidateClassName)
candidateClassName
- Name of the candidate classpublic String getCandidateClassName()
protected AbstractClassMetaData getCandidateClassMetaData()
public void setFrom(String from)
from
- the candidatespublic String getFrom()
public void setFilter(String filter)
filter
- the query filter.public String getFilter()
public void declareImports(String imports)
imports
- import statements separated by semicolons.public String getImportsDeclaration()
public void declareExplicitParameters(String parameters)
parameters
- the list of parameters separated by commaspublic String getExplicitParametersDeclaration()
public void declareExplicitVariables(String variables)
variables
- the variables separated by semicolons.public String getExplicitVariablesDeclaration()
public void setImplicitParameter(String name, Object value)
name
- Name of the parametervalue
- Value of the parameterQueryInvalidParametersException
- if the parameter is invalidpublic void setImplicitParameter(int position, Object value)
position
- Position of the parametervalue
- Value of the parameterQueryInvalidParametersException
- if the parameter is invalidprotected void applyImplicitParameterValueToCompilation(String name, Object value)
name
- Name of the parametervalue
- Value of the parameterQueryInvalidParametersException
- if the parameter doesn't exist in the query or if the type
of the parameter provided is inconsistent with the queryprotected boolean applyImplicitParameterValueToSubqueries(String name, Object value, QueryCompilation comp)
public Map getImplicitParameters()
public void setOrdering(String ordering)
ordering
- the ordering specification.public String getOrdering()
public void setGrouping(String grouping)
grouping
- the grouping specification.public String getGrouping()
public void setHaving(String having)
having
- the having specification.public String getHaving()
public abstract void setCandidates(Extent<T> pcs)
pcs
- the Candidate Extent.public abstract void setCandidates(Collection<T> pcs)
pcs
- the Candidate collection.public void setUnique(boolean unique)
unique
- whether the result is uniquepublic boolean isUnique()
public void setRange(long fromIncl, long toExcl)
fromIncl
- From element no (inclusive) to returntoExcl
- To element no (exclusive) to returnpublic void setRange(String range)
range
- Range stringpublic String getRange()
public long getRangeFromIncl()
public long getRangeToExcl()
public String getRangeFromInclParam()
public String getRangeToExclParam()
public void setResult(String result)
result
- Comma-separated result expressionspublic String getResult()
public void setResultDistinct(boolean distinct)
distinct
- Whether to treat as distinctpublic boolean getResultDistinct()
public String getResultClassName()
public void setResultClassName(String resultClassName)
resultClassName
- Name of the result classpublic void setResultClass(Class result_cls)
result_cls
- The result classpublic Class getResultClass()
public void setResultMetaData(QueryResultMetaData qrmd)
qrmd
- QueryResultMetaDatapublic void setIgnoreCache(boolean ignoreCache)
ignoreCache
- the setting of the ignoreCache option.public boolean getIgnoreCache()
setIgnoreCache(boolean)
public boolean isSubclasses()
public void setSubclasses(boolean subclasses)
subclasses
- Where subclasses of the candidate class are to be included.public Boolean getSerializeRead()
public void setSerializeRead(Boolean serialize)
serialize
- Whether to serialise (lock) the query objectspublic boolean isUnmodifiable()
protected void assertIsModifiable()
NucleusUserException
- Thrown when it is unmodifiablepublic void setUnmodifiable()
public void setDatastoreReadTimeoutMillis(Integer timeout)
timeout
- The timeoutpublic Integer getDatastoreReadTimeoutMillis()
public void setDatastoreWriteTimeoutMillis(Integer timeout)
timeout
- The timeoutpublic Integer getDatastoreWriteTimeoutMillis()
public QueryManager getQueryManager()
public void addSubquery(Query sub, String variableDecl, String candidateExpr, Map paramMap)
sub
- The subqueryvariableDecl
- Declaration of variable that represents this subquery in the outer querycandidateExpr
- Candidate expressionparamMap
- Map of parameters for this subquerypublic Query.SubqueryDefinition getSubqueryForVariable(String variableName)
variableName
- Name of the variablepublic boolean hasSubqueryForVariable(String variableName)
variableName
- Name of the variableprotected void prepareDatastore()
public QueryCompilation getCompilation()
protected boolean isCompiled()
public void compile()
protected abstract void compileInternal(Map parameterValues)
parameterValues
- Parameter values keyed by name (when compiling for execution)public Imports getParsedImports()
public Object execute()
executeWithArray(Object[] parameters)
public Object executeWithArray(Object[] parameterValues)
parameterValues
- the Object array with all of the parameters.NoQueryResultsException
- Thrown if no results were returned from the query.executeQuery(Map parameters)
public Object executeWithMap(Map parameters)
parameters
- the Map containing all of the parameters.NoQueryResultsException
- Thrown if no results were returned from the query.executeQuery(Map parameters)
public Map getInputParameters()
protected boolean supportsTimeout()
protected Object executeQuery(Map parameters)
parameters
- Map of parameter values keyed by parameter nameNoQueryResultsException
- Thrown if no results were returned from the query.QueryNotUniqueException
- Thrown if multiple results, yet expected oneprotected void assertSupportsCancel()
UnsupportedOperationException
if the query implementation doesn't
support cancelling queries. Implementations that support the cancel operation should override this.public void cancel()
assertSupportsCancel()
public void cancel(Thread thread)
assertSupportsCancel()
thread
- The threadprotected void registerTask(Object taskObject)
protected void deregisterTask()
protected boolean cancelTaskObject(Object obj)
obj
- The taskprotected abstract Object performExecute(Map parameters)
parameters
- Map containing the parameters.public boolean processesRangeInDatastoreQuery()
public long deletePersistentAll()
public long deletePersistentAll(Object[] parameterValues)
parameterValues
- the Object array with values of the parameters.public long deletePersistentAll(Map parameters)
parameters
- Map of parameters for the queryprotected long performDeletePersistentAll(Map parameters)
parameters
- the Map containing all of the parameters.public void close(Object queryResult)
queryResult
- the result of execute(...) on this Query instance.public void closeAll()
protected boolean shouldReturnSingleRow()
protected Map getParameterMapForValues(Object[] parameterValues)
parameterValues
- Parameter valuesprotected boolean useFetchPlan()
public boolean useCaching()
public boolean useResultsCaching()
public boolean checkUnusedParameters()
protected void checkParameterTypesAgainstCompilation(Map parameterValues)
parameterValues
- The input parameter values keyed by their name (or position)protected void checkForMissingParameters(Map parameterValues)
parameterValues
- The input parameter values keyed by their name (or position)protected Symbol deepFindSymbolForParameterInCompilation(QueryCompilation compilation, Object paramKey)
public Class resolveClassDeclaration(String classDecl)
classDecl
- The declarationNucleusUserException
- Thrown if the class cannot be resolved.protected void assertIsOpen()
public Object getNativeQuery()
Copyright © 2019. All rights reserved.