|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.triactive.jdo.store.Query
The Query interface allows applications to obtain persistent instances from the data store.
Query,
Serialized Form| Nested Class Summary | |
static interface |
Query.ResultObjectFactory
An object that reads result set rows and returns corresponding persistent objects from them. |
| Field Summary | |
protected java.lang.Class |
candidateClass
|
protected DatabaseAdapter |
dba
|
protected java.lang.String |
filter
|
protected java.lang.String |
imports
|
protected boolean |
isCompiled
|
protected java.lang.String |
ordering
|
protected java.util.List |
parameterNames
|
protected java.lang.String |
parameters
|
protected java.util.Map |
parameterTypesByName
|
protected Imports |
parsedImports
|
protected PersistenceManager |
pm
|
protected java.util.HashSet |
queryResults
|
protected StoreManager |
storeMgr
|
protected java.util.List |
variableNames
|
protected java.lang.String |
variables
|
protected java.util.Map |
variableTypesByName
|
| Constructor Summary | |
Query(PersistenceManager pm,
StoreManager storeMgr)
Constructs a new query instance that uses the given persistence manager. |
|
| Method Summary | |
void |
close(java.lang.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. |
void |
declareImports(java.lang.String imports)
Set the import statements to be used to identify the fully qualified name of variables or parameters. |
void |
declareParameters(java.lang.String parameters)
Declare the list of parameters query execution. |
void |
declareVariables(java.lang.String variables)
Declare the unbound variables to be used in the query. |
protected void |
discardCompiled()
|
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
execute()
Execute the query and return the filtered Collection. |
java.lang.Object |
execute(java.lang.Object p1)
Execute the query and return the filtered Collection. |
java.lang.Object |
execute(java.lang.Object p1,
java.lang.Object p2)
Execute the query and return the filtered Collection. |
java.lang.Object |
execute(java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3)
Execute the query and return the filtered Collection. |
java.lang.Object |
executeWithArray(java.lang.Object[] parameters)
Execute the query and return the filtered Collection. |
abstract java.lang.Object |
executeWithMap(java.util.Map parameters)
Execute the query and return the filtered Collection. |
java.lang.Class |
getCandidateClass()
Get the class of the candidate instances of the query. |
boolean |
getIgnoreCache()
Get the ignoreCache option setting. |
javax.jdo.PersistenceManager |
getPersistenceManager()
Get the PersistenceManager associated with this Query. |
StoreManager |
getStoreManager()
Get the StoreManager associated with this Query. |
int |
hashCode()
|
protected static boolean |
isValidJavaIdentifier(java.lang.String s)
|
java.lang.Class |
resolveClassDeclaration(java.lang.String classDecl)
|
abstract void |
setCandidates(java.util.Collection pcs)
Set the candidate Collection to query. |
abstract void |
setCandidates(javax.jdo.Extent pcs)
Set the candidate Extent to query. |
void |
setClass(java.lang.Class candidateClass)
Set the class of the candidate instances of the query. |
void |
setFilter(java.lang.String filter)
Set the filter for the query. |
void |
setIgnoreCache(boolean ignoreCache)
Set the ignoreCache option. |
void |
setOrdering(java.lang.String ordering)
Set the ordering specification for the result Collection. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final transient PersistenceManager pm
protected final transient StoreManager storeMgr
protected final transient DatabaseAdapter dba
protected java.lang.Class candidateClass
protected java.lang.String filter
protected java.lang.String imports
protected java.lang.String variables
protected java.lang.String parameters
protected java.lang.String ordering
protected transient boolean isCompiled
protected transient Imports parsedImports
protected transient java.util.List parameterNames
protected transient java.util.Map parameterTypesByName
protected transient java.util.List variableNames
protected transient java.util.Map variableTypesByName
protected transient java.util.HashSet queryResults
| Constructor Detail |
public Query(PersistenceManager pm,
StoreManager storeMgr)
pm - the associated persistence manager for this query.| Method Detail |
protected void discardCompiled()
public boolean equals(java.lang.Object obj)
public int hashCode()
public StoreManager getStoreManager()
public javax.jdo.PersistenceManager getPersistenceManager()
getPersistenceManager in interface javax.jdo.QueryQuery.getPersistenceManager()public java.lang.Class getCandidateClass()
Query.setClass(java.lang.Class)public void setClass(java.lang.Class candidateClass)
setClass in interface javax.jdo.QuerycandidateClass - the Class of the candidate instances.Query.setClass(java.lang.Class)public abstract void setCandidates(javax.jdo.Extent pcs)
setCandidates in interface javax.jdo.Querypcs - the Candidate Extent.Query.setCandidates(javax.jdo.Extent)public abstract void setCandidates(java.util.Collection pcs)
setCandidates in interface javax.jdo.Querypcs - the Candidate collection.Query.setCandidates(java.util.Collection)public void setFilter(java.lang.String filter)
setFilter in interface javax.jdo.Queryfilter - the query filter.Query.setFilter(java.lang.String)public void declareImports(java.lang.String imports)
declareImports in interface javax.jdo.Queryimports - import statements separated by semicolons.Query.declareImports(java.lang.String)public void declareParameters(java.lang.String parameters)
declareParameters in interface javax.jdo.Queryparameters - the list of parameters separated by commas.Query.declareParameters(java.lang.String)public void declareVariables(java.lang.String variables)
declareVariables in interface javax.jdo.Queryvariables - the variables separated by semicolons.Query.declareVariables(java.lang.String)public void setOrdering(java.lang.String ordering)
setOrdering in interface javax.jdo.Queryordering - the ordering specification.Query.setOrdering(java.lang.String)public void setIgnoreCache(boolean ignoreCache)
This implementation does not support the ignore cache option, so this method does nothing.
setIgnoreCache in interface javax.jdo.QueryignoreCache - the setting of the ignoreCache option.Query.setIgnoreCache(boolean)public boolean getIgnoreCache()
This implementation does not support the ignore cache option, so this method always returns false.
getIgnoreCache in interface javax.jdo.QueryQuery.getIgnoreCache(),
setIgnoreCache(boolean)public void compile()
compile in interface javax.jdo.QueryQuery.compile()protected static boolean isValidJavaIdentifier(java.lang.String s)
public java.lang.Class resolveClassDeclaration(java.lang.String classDecl)
public java.lang.Object execute()
execute in interface javax.jdo.QueryQuery.execute(),
executeWithArray(Object[] parameters)public java.lang.Object execute(java.lang.Object p1)
execute in interface javax.jdo.Queryp1 - the value of the first parameter declared.
Query.execute(Object),
executeWithArray(Object[] parameters)
public java.lang.Object execute(java.lang.Object p1,
java.lang.Object p2)
execute in interface javax.jdo.Queryp1 - the value of the first parameter declared.p2 - the value of the second parameter declared.
Query.execute(Object,Object),
executeWithArray(Object[] parameters)
public java.lang.Object execute(java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3)
execute in interface javax.jdo.Queryp1 - the value of the first parameter declared.p2 - the value of the second parameter declared.p3 - the value of the third parameter declared.
Query.execute(Object,Object,Object),
executeWithArray(Object[] parameters)public java.lang.Object executeWithArray(java.lang.Object[] parameters)
executeWithArray in interface javax.jdo.Queryparameters - the Object array with all of the parameters.
Query.executeWithArray(Object[])public abstract java.lang.Object executeWithMap(java.util.Map parameters)
executeWithMap in interface javax.jdo.Queryparameters - the Map containing all of the parameters.
Query.executeWithMap(Map),
executeWithArray(Object[] parameters)public void close(java.lang.Object queryResult)
close in interface javax.jdo.QueryqueryResult - the result of execute(...) on this Query instance.Query.close(java.lang.Object)public void closeAll()
closeAll in interface javax.jdo.QueryQuery.closeAll()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||