|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.query.Query
org.datanucleus.store.query.AbstractJavaQuery
org.datanucleus.store.query.AbstractJPQLQuery
org.datanucleus.store.rdbms.query.JPQLQuery
public class JPQLQuery
RDBMS representation of a JPQL query for use by DataNucleus. The query can be specified via method calls, or via a single-string form.
Query,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.datanucleus.store.query.Query |
|---|
org.datanucleus.store.query.Query.SubqueryDefinition |
| Field Summary | |
|---|---|
protected java.lang.String |
candidateAlias
|
protected org.datanucleus.store.mapped.expression.Queryable |
candidates
Candidates for this query. |
protected boolean |
isCompiled
State variable for the compilation state |
protected org.datanucleus.store.mapped.expression.QueryExpression |
queryStmt
The Query Statement. |
protected QueryResultsMetaData |
resultMetaData
Result metadata (extension, allowing access to more info about results). |
protected org.datanucleus.store.query.ResultObjectFactory |
rof
Factory for obtaining the results from the query result set. |
| Fields inherited from class org.datanucleus.store.query.AbstractJavaQuery |
|---|
candidateCollection, candidateExtent, singleString |
| Fields inherited from class org.datanucleus.store.query.Query |
|---|
BULK_DELETE, BULK_UPDATE, candidateClass, candidateClassName, compilation, explicitParameters, explicitVariables, extensions, filter, from, fromInclNo, grouping, having, ignoreCache, implicitParameters, imports, LOCALISER, om, ordering, parameterNames, parsedImports, queryResults, range, result, resultClass, resultClassName, resultDistinct, SELECT, subclasses, subqueries, tasks, toExclNo, type, unique, unmodifiable, update |
| Constructor Summary | |
|---|---|
JPQLQuery(org.datanucleus.ObjectManager om)
Constructs a new query instance that uses the given persistence manager. |
|
JPQLQuery(org.datanucleus.ObjectManager om,
JPQLQuery q)
Constructs a new query instance having the same criteria as the given query. |
|
JPQLQuery(org.datanucleus.ObjectManager om,
java.lang.String query)
Constructor for a JPQL query where the query is specified using the "Single-String" format. |
|
| Method Summary | |
|---|---|
protected void |
compileInternal(boolean forExecute,
java.util.Map parameterValues)
Verify the elements of the query and provide a hint to the query to prepare and optimize an execution plan. |
protected void |
discardCompiled()
Method to discard our current compiled query due to changes. |
boolean |
equals(java.lang.Object obj)
Equality operator for JPQL. |
protected java.lang.Object |
executeQuery(java.util.Map parameters)
Method to execute the actual query. |
org.datanucleus.store.mapped.expression.Queryable |
getCandidates()
Accessor for the candidates for the query. |
org.datanucleus.util.Imports |
getParsedImports()
Accessor for the parsed imports. |
QueryResultsMetaData |
getResultSetMetaData()
Retrieve the metadata for the results. |
java.util.Set<java.lang.String> |
getSupportedExtensions()
Method to return the names of the extensions supported by this query. |
protected boolean |
isCompiled()
Method to return if the query is compiled. |
protected long |
performDeletePersistentAll(java.util.Map parameters)
Execute the query to delete persistent objects. |
protected java.lang.Object |
performExecute(java.util.Map executeParameters)
Execute the query and return the filtered QueryResult. |
| Methods inherited from class org.datanucleus.store.query.AbstractJPQLQuery |
|---|
getSingleStringQuery, resolveClassDeclaration, setResult |
| Methods inherited from class org.datanucleus.store.query.AbstractJavaQuery |
|---|
evaluateInMemory, getCandidateCollection, getCandidateExtent, setCandidates, setCandidates, toString |
| Methods inherited from class org.datanucleus.store.query.Query |
|---|
addExtension, addSubquery, applyImplicitParameterValueToCompilation, applyRangeChecks, assertIsModifiable, assertSupportsCancel, cancel, cancel, checkParameterTypesAgainstCompilation, close, closeAll, compile, declareExplicitParameters, declareExplicitVariables, declareImports, deletePersistentAll, deletePersistentAll, deletePersistentAll, execute, executeWithArray, executeWithMap, getBooleanExtensionProperty, getCandidateClass, getCandidateClassName, getCompilation, getExplicitParameters, getExplicitVariables, getExtension, getExtensions, getFetchPlan, getFilter, getFrom, getGrouping, getHaving, getIgnoreCache, getImplicitParameters, getImports, getInputParameters, getObjectManager, getOrdering, getParameterMapForValues, getPerformExecuteTask, getRange, getRangeFromIncl, getRangeToExcl, getResult, getResultClass, getResultClassName, getResultDistinct, getSerializeRead, getStoreManager, getSubqueryForVariable, getTimeoutMillis, getType, getUpdate, hashCode, hasSubqueryForVariable, isSubclasses, isUnique, isUnmodifiable, performExecuteInternal, performExecuteTask, prepareDatastore, setCandidateClassName, setClass, setExtensions, setFetchPlan, setFilter, setFrom, setGrouping, setHaving, setIgnoreCache, setImplicitParameter, setImplicitParameter, setOrdering, setRange, setRange, setResultClass, setResultClassName, setResultDistinct, setResultMetaData, setSerializeRead, setSubclasses, setTimeoutMillis, setType, setUnique, setUnmodifiable, setUpdate, shouldReturnSingleRow, useFetchPlan |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient org.datanucleus.store.mapped.expression.QueryExpression queryStmt
protected transient org.datanucleus.store.mapped.expression.Queryable candidates
protected transient java.lang.String candidateAlias
protected transient org.datanucleus.store.query.ResultObjectFactory rof
protected transient boolean isCompiled
protected transient QueryResultsMetaData resultMetaData
| Constructor Detail |
|---|
public JPQLQuery(org.datanucleus.ObjectManager om)
om - the associated ObjectManager for this query.
public JPQLQuery(org.datanucleus.ObjectManager om,
JPQLQuery q)
om - The ObjectManagerq - The query from which to copy criteria.
public JPQLQuery(org.datanucleus.ObjectManager om,
java.lang.String query)
om - The ObjectManagerquery - The query string| Method Detail |
|---|
public org.datanucleus.store.mapped.expression.Queryable getCandidates()
public boolean equals(java.lang.Object obj)
equals in class org.datanucleus.store.query.QueryObject.equals(java.lang.Object)protected void discardCompiled()
discardCompiled in class org.datanucleus.store.query.AbstractJavaQueryQuery.discardCompiled()protected boolean isCompiled()
isCompiled in class org.datanucleus.store.query.Query
protected void compileInternal(boolean forExecute,
java.util.Map parameterValues)
compileInternal in class org.datanucleus.store.query.AbstractJPQLQuerypublic QueryResultsMetaData getResultSetMetaData()
protected java.lang.Object executeQuery(java.util.Map parameters)
executeQuery in class org.datanucleus.store.query.Queryparameters - Map of parameter values keyed by parameter name
org.datanucleus.store.query.NoQueryResultsException - Thrown if no results were returned from the query.
org.datanucleus.store.query.QueryNotUniqueException - Thrown if multiple results, yet expected oneprotected java.lang.Object performExecute(java.util.Map executeParameters)
performExecute in class org.datanucleus.store.query.QueryexecuteParameters - Map containing all of the parameters.
protected long performDeletePersistentAll(java.util.Map parameters)
performDeletePersistentAll in class org.datanucleus.store.query.AbstractJavaQueryparameters - the Map containing all of the parameters.
public java.util.Set<java.lang.String> getSupportedExtensions()
getSupportedExtensions in class org.datanucleus.store.query.AbstractJavaQuerypublic org.datanucleus.util.Imports getParsedImports()
getParsedImports in class org.datanucleus.store.query.Query
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||