|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.triactive.jdo.store.query.Query
The Query interface allows applications to obtain persistent instances from the data store.
Query,
Serialized Form| Field Summary | |
protected java.lang.Class |
candidateClass
|
protected DatabaseAdapter |
dba
|
protected java.util.Map |
extensions
|
protected java.lang.String |
filter
|
protected java.lang.String |
grouping
|
protected java.lang.String |
imports
|
protected boolean |
isPart1Compiled
|
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.Collection |
queryResults
|
protected java.lang.String |
result
|
protected java.lang.Class |
resultClass
|
protected StoreManager |
storeMgr
|
protected java.lang.Boolean |
unique
|
protected java.util.List |
variableNames
|
protected java.lang.String |
variables
|
protected java.util.Map |
variableTypesByName
|
| Constructor Summary | |
Query(PersistenceManager pm,
Query existingQuery)
Constructs a new query instance from an existing instance. |
|
| Method Summary | |
void |
addExtension(java.lang.String key,
java.lang.Object value)
Adds a vendor-specific extension to this query. |
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()
|
protected int |
effectiveFetchSize()
|
protected int |
effectiveResultSetType()
|
protected abstract boolean |
effectiveUniqueSetting()
|
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. |
protected abstract ResultExpression |
getResultExpression(java.sql.ResultSetMetaData rsmd)
|
protected abstract StatementText |
getStatementText()
|
StoreManager |
getStoreManager()
Get the StoreManager associated with this Query. |
int |
hashCode()
|
protected boolean |
isKnownExtensionKey(java.lang.String key)
|
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 |
setExtensions(java.util.Map extensions)
Sets multiple extensions, or use null to clear all extensions. |
void |
setFilter(java.lang.String filter)
Set the filter for the query. |
void |
setGrouping(java.lang.String grouping)
Set the grouping expressions, optionally including a "having" clause. |
void |
setIgnoreCache(boolean ignoreCache)
Set the ignoreCache option. |
void |
setOrdering(java.lang.String ordering)
Set the ordering specification for the result Collection. |
void |
setResult(java.lang.String result)
Specifies what type of data this query should return. |
void |
setResultClass(java.lang.Class resultClass)
Specifies the type of object in which to return each element of the result of invoking Query.execute() or one of its
siblings. |
void |
setUnique(boolean unique)
Specify that only the first result of the query should be returned, rather than a 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.Boolean unique
protected java.lang.String result
protected java.lang.Class resultClass
protected java.lang.Class candidateClass
protected java.lang.String filter
protected java.lang.String variables
protected java.lang.String parameters
protected java.lang.String imports
protected java.lang.String grouping
protected java.lang.String ordering
protected java.util.Map extensions
protected transient boolean isPart1Compiled
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.Collection queryResults
| Constructor Detail |
public Query(PersistenceManager pm,
Query existingQuery)
pm - the associated persistence manager for this query.existingQuery - a query from which to copy criteria, or null for an
empty query.| Method Detail |
protected void discardCompiled()
public int hashCode()
public boolean equals(java.lang.Object obj)
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 setResult(java.lang.String result)
setResult in interface Queryresult - a comma-delimited list of expressions (fields, functions on fields,
or aggregate functions) to return from this query.Query.setResult(java.lang.String)public void setResultClass(java.lang.Class resultClass)
Query.execute() or one of its
siblings.
setResultClass in interface QueryresultClass - the result classQuery.setResultClass(java.lang.Class)public void setGrouping(java.lang.String grouping)
setGrouping in interface Querygrouping - a comma-delimited list of expressions, optionally followed by the
"having" keyword and a boolean expression.Query.setGrouping(java.lang.String)public void setUnique(boolean unique)
setUnique in interface Queryunique - if true, only one element is returned.Query.setUnique(boolean)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 addExtension(java.lang.String key,
java.lang.Object value)
addExtension in interface Querykey - the key of the extensionvalue - the value of the extensionQuery.addExtension(java.lang.String, java.lang.Object)public void setExtensions(java.util.Map extensions)
setExtensions in interface Queryextensions - the map of extensionsQuery.setExtensions(java.util.Map)protected boolean isKnownExtensionKey(java.lang.String key)
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)protected abstract StatementText getStatementText()
protected abstract ResultExpression getResultExpression(java.sql.ResultSetMetaData rsmd)
throws java.sql.SQLException
java.sql.SQLExceptionprotected abstract boolean effectiveUniqueSetting()
protected int effectiveResultSetType()
protected int effectiveFetchSize()
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 | ||||||||||