|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.jdo.JDOQuery
public class JDOQuery
Wrapper for JDO Query class. Stores the PM the query is executed against, the internal query, and the query language. The language is stored since it is referenced by the JDO API and so we don't have to embody knowledge of which internal query type is for which language (could be moved to the internal query).
| Field Summary |
|---|
| Fields inherited from interface javax.jdo.Query |
|---|
JDOQL, SQL |
| Constructor Summary | |
|---|---|
JDOQuery(javax.jdo.PersistenceManager pm,
Query query,
java.lang.String language)
Constructor for a query used by JDO. |
|
| Method Summary | |
|---|---|
void |
addExtension(java.lang.String key,
java.lang.Object value)
Method to add an extension to the query. |
void |
addSubquery(javax.jdo.Query sub,
java.lang.String variableDecl,
java.lang.String candidateExpr)
Add a subquery to this query. |
void |
addSubquery(javax.jdo.Query sub,
java.lang.String variableDecl,
java.lang.String candidateExpr,
java.util.Map parameters)
Add a subquery to this query. |
void |
addSubquery(javax.jdo.Query sub,
java.lang.String variableDecl,
java.lang.String candidateExpr,
java.lang.String... parameters)
Add a subquery to this query. |
void |
addSubquery(javax.jdo.Query sub,
java.lang.String variableDecl,
java.lang.String candidateExpr,
java.lang.String parameter)
Add a subquery to this query. |
void |
cancel(java.lang.Thread thr)
Method to cancel the executing query for the supplied thread. |
void |
cancelAll()
Method to cancel any executing queries. |
void |
close(java.lang.Object queryResult)
Close the query result. |
void |
closeAll()
Close all query results for this query. |
void |
compile()
Compile the query. |
void |
declareImports(java.lang.String imports)
Declare any imports for the query. |
void |
declareParameters(java.lang.String parameters)
Declare any parameters for the query. |
void |
declareVariables(java.lang.String variables)
Declare any variables for the query. |
long |
deletePersistentAll()
Execute the query deleting all instances found. |
long |
deletePersistentAll(java.util.Map parameters)
Execute the query deleting all instances found. |
long |
deletePersistentAll(java.lang.Object... parameters)
Execute the query deleting all instances found. |
java.lang.Object |
execute()
Execute the query. |
java.lang.Object |
execute(java.lang.Object p1)
Execute the query. |
java.lang.Object |
execute(java.lang.Object p1,
java.lang.Object p2)
Execute the query. |
java.lang.Object |
execute(java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3)
Execute the query. |
java.lang.Object |
executeWithArray(java.lang.Object... parameterValues)
Execute the query. |
java.lang.Object |
executeWithMap(java.util.Map parameters)
Execute the query. |
java.lang.Integer |
getDatastoreReadTimeoutMillis()
Accessor for the datastore read timeout. |
java.lang.Integer |
getDatastoreWriteTimeoutMillis()
Accessor for the datastore write timeout. |
javax.jdo.FetchPlan |
getFetchPlan()
Accessor for the fetch plan to use. |
boolean |
getIgnoreCache()
Accessor for the ignore cache setting |
Query |
getInternalQuery()
Accessor for the internal query. |
java.lang.String |
getLanguage()
Accessor for the query language. |
javax.jdo.PersistenceManager |
getPersistenceManager()
Accessor for the PersistenceManager. |
java.lang.Boolean |
getSerializeRead()
Accessor for whether to serialise any read objects in this query. |
boolean |
isUnmodifiable()
Accessor for whether the query is modifiable. |
void |
setCandidates(java.util.Collection pcs)
Set the candidates for the query. |
void |
setCandidates(javax.jdo.Extent extent)
Set the candidates for the query. |
void |
setClass(java.lang.Class candidateClass)
Set the candidate class for the query. |
void |
setDatastoreReadTimeoutMillis(java.lang.Integer timeout)
Set the datastore read timeout. |
void |
setDatastoreWriteTimeoutMillis(java.lang.Integer timeout)
Set the datastore write timeout. |
void |
setExtensions(java.util.Map extensions)
Set the extensions for the query. |
void |
setFilter(java.lang.String filter)
Set the filter for the query. |
void |
setGrouping(java.lang.String grouping)
Set the grouping for the query. |
void |
setIgnoreCache(boolean ignoreCache)
Set the ignore cache setting for the query. |
void |
setOrdering(java.lang.String ordering)
Set the ordering for the query. |
void |
setRange(long fromIncl,
long toExcl)
Set the range for the query. |
void |
setRange(java.lang.String range)
Set the range for the query. |
void |
setResult(java.lang.String result)
Set the result for the query. |
void |
setResultClass(java.lang.Class result_cls)
Set the result class for the query. |
void |
setSerializeRead(java.lang.Boolean serialize)
Mutator for whether to serialise any read objects. |
void |
setUnique(boolean unique)
Set whether to expect a unique result. |
void |
setUnmodifiable()
Set the query to be unmodifiable. |
java.lang.String |
toString()
Convenience method to return the query in string form. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JDOQuery(javax.jdo.PersistenceManager pm,
Query query,
java.lang.String language)
pm - PersistenceManagerquery - Underlying querylanguage - Query language| Method Detail |
|---|
public void close(java.lang.Object queryResult)
close in interface javax.jdo.QueryqueryResult - Query resultpublic void closeAll()
closeAll in interface javax.jdo.Querypublic void compile()
compile in interface javax.jdo.Querypublic void declareImports(java.lang.String imports)
declareImports in interface javax.jdo.Queryimports - The importspublic void declareParameters(java.lang.String parameters)
declareParameters in interface javax.jdo.Queryparameters - The parameterspublic void declareVariables(java.lang.String variables)
declareVariables in interface javax.jdo.Queryvariables - The variablespublic long deletePersistentAll()
deletePersistentAll in interface javax.jdo.Querypublic long deletePersistentAll(java.lang.Object... parameters)
deletePersistentAll in interface javax.jdo.Queryparameters - Parameters to use when executing
public long deletePersistentAll(java.util.Map parameters)
deletePersistentAll in interface javax.jdo.Queryparameters - Parameters to use when executing
public java.lang.Object execute()
execute in interface javax.jdo.Querypublic java.lang.Object execute(java.lang.Object p1)
execute in interface javax.jdo.Queryp1 - First param value
public java.lang.Object execute(java.lang.Object p1,
java.lang.Object p2)
execute in interface javax.jdo.Queryp1 - First param valuep2 - Second param value
public java.lang.Object execute(java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3)
execute in interface javax.jdo.Queryp1 - First param valuep2 - Second param valuep3 - Third param value
public java.lang.Object executeWithArray(java.lang.Object... parameterValues)
executeWithArray in interface javax.jdo.QueryparameterValues - Param values
public java.lang.Object executeWithMap(java.util.Map parameters)
executeWithMap in interface javax.jdo.Queryparameters - Param values
public void cancelAll()
cancelAll in interface javax.jdo.Queryjavax.jdo.JDOUnsupportedOptionException - if the datastore doesn't support cancellation of queriespublic void cancel(java.lang.Thread thr)
cancel in interface javax.jdo.Queryjavax.jdo.JDOUnsupportedOptionException - if the datastore doesn't support cancellation of queriespublic void setCandidates(javax.jdo.Extent extent)
setCandidates in interface javax.jdo.Queryextent - Extent defining the candidatespublic void setCandidates(java.util.Collection pcs)
setCandidates in interface javax.jdo.Querypcs - PC candidatespublic void setClass(java.lang.Class candidateClass)
setClass in interface javax.jdo.QuerycandidateClass - Candidate class
public void addExtension(java.lang.String key,
java.lang.Object value)
addExtension in interface javax.jdo.Querykey - Key for the extensionvalue - Value for the extensionpublic void setExtensions(java.util.Map extensions)
setExtensions in interface javax.jdo.Queryextensions - The extensionspublic javax.jdo.FetchPlan getFetchPlan()
getFetchPlan in interface javax.jdo.Querypublic void setFilter(java.lang.String filter)
setFilter in interface javax.jdo.Queryfilter - The query filterpublic void setGrouping(java.lang.String grouping)
setGrouping in interface javax.jdo.Querygrouping - The groupingpublic boolean getIgnoreCache()
getIgnoreCache in interface javax.jdo.Querypublic void setIgnoreCache(boolean ignoreCache)
setIgnoreCache in interface javax.jdo.QueryignoreCache - The ignore cache settingpublic void setOrdering(java.lang.String ordering)
setOrdering in interface javax.jdo.Queryordering - The orderingpublic javax.jdo.PersistenceManager getPersistenceManager()
getPersistenceManager in interface javax.jdo.Querypublic void setRange(java.lang.String range)
setRange in interface javax.jdo.Queryrange - The range specification
public void setRange(long fromIncl,
long toExcl)
setRange in interface javax.jdo.QueryfromIncl - From range inclusivetoExcl - To range exclusivepublic void setResult(java.lang.String result)
setResult in interface javax.jdo.Queryresult - Result clausepublic void setResultClass(java.lang.Class result_cls)
setResultClass in interface javax.jdo.Queryresult_cls - Result classpublic void setDatastoreReadTimeoutMillis(java.lang.Integer timeout)
setDatastoreReadTimeoutMillis in interface javax.jdo.Querytimeout - Timeout interval (millisecs)public java.lang.Integer getDatastoreReadTimeoutMillis()
getDatastoreReadTimeoutMillis in interface javax.jdo.Querypublic void setDatastoreWriteTimeoutMillis(java.lang.Integer timeout)
setDatastoreWriteTimeoutMillis in interface javax.jdo.Querytimeout - Timeout interval (millisecs)public java.lang.Integer getDatastoreWriteTimeoutMillis()
getDatastoreWriteTimeoutMillis in interface javax.jdo.Querypublic void setUnique(boolean unique)
setUnique in interface javax.jdo.Queryunique - Whether results are uniquepublic boolean isUnmodifiable()
isUnmodifiable in interface javax.jdo.Querypublic void setUnmodifiable()
setUnmodifiable in interface javax.jdo.Query
public void addSubquery(javax.jdo.Query sub,
java.lang.String variableDecl,
java.lang.String candidateExpr)
addSubquery in interface javax.jdo.Querysub - the subquery to add to this QueryvariableDecl - the name of the variable in the outer query to bind the results of the subquerycandidateExpr - the candidate collection of the subquery as an expression using terms of the outer query
public void addSubquery(javax.jdo.Query sub,
java.lang.String variableDecl,
java.lang.String candidateExpr,
java.lang.String parameter)
addSubquery in interface javax.jdo.Querysub - the subquery to add to this QueryvariableDecl - the name of the variable to be used in this QuerycandidateExpr - the candidate collection to apply to the subqueryparameter - the expression from the outer query to bind the parameter in the subquery
public void addSubquery(javax.jdo.Query sub,
java.lang.String variableDecl,
java.lang.String candidateExpr,
java.lang.String... parameters)
addSubquery in interface javax.jdo.Querysub - the subquery to add to this QueryvariableDecl - the name of the variable to be used in this QuerycandidateExpr - the candidate collection to apply to the subqueryparameters - the expressions from the outer query to bind the parameter in the subquery
public void addSubquery(javax.jdo.Query sub,
java.lang.String variableDecl,
java.lang.String candidateExpr,
java.util.Map parameters)
addSubquery in interface javax.jdo.Querysub - the subquery to add to this QueryvariableDecl - the name of the variable to be used in this QuerycandidateExpr - the candidate collection to apply to the subqueryparameters - the expressions from the outer query to bind the parameter in the subquerypublic java.lang.Boolean getSerializeRead()
getSerializeRead in interface javax.jdo.Querypublic void setSerializeRead(java.lang.Boolean serialize)
setSerializeRead in interface javax.jdo.Queryserialize - Whether to serialise any read objects in this query.public Query getInternalQuery()
public java.lang.String getLanguage()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||