|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.query.Query
org.jpox.store.query.JDOQLQuery
public class JDOQLQuery
A JDO query that uses the JQOQL language. The query can be specified via method calls, or via a single-string form.
Query,
Serialized Form| Nested Class Summary | |
|---|---|
class |
JDOQLQuery.Compiler
Inner class to compile the query for execution. |
static class |
JDOQLQuery.ExecutedCompileCache
Cache a compiled query |
| Nested classes/interfaces inherited from class org.jpox.store.query.Query |
|---|
Query.ResultObjectFactory |
| Field Summary | |
|---|---|
protected java.util.Collection |
candidateCollection
|
protected javax.jdo.Extent |
candidateExtent
|
protected Queryable |
candidates
|
static java.lang.String[] |
SINGLE_STRING_KEYWORDS
Keywords used in single-string JDOQL. |
protected static java.lang.String[] |
SINGLE_STRING_KEYWORDS_LOWERCASE
Keywords in lowercase (we avoid calling toLowerCase() multiple times, which is expensive operation) |
| Fields inherited from class org.jpox.store.query.Query |
|---|
candidateClass, candidateClassName, dba, extensions, fetchPlan, filter, fromInclNo, grouping, ignoreCache, imports, isCompiled, isPreCompile, LOCALISER, ordering, parameterNames, parameters, parameterTypesByName, parsedImports, pm, queryResults, range, result, resultClass, resultClassName, subclasses, toExclNo, unique, unmodifiable, variableNames, variables, variableTypesByName |
| Fields inherited from interface javax.jdo.Query |
|---|
JDOQL, SQL |
| Constructor Summary | |
|---|---|
JDOQLQuery(PersistenceManager pm)
Constructs a new query instance that uses the given persistence manager. |
|
JDOQLQuery(PersistenceManager pm,
JDOQLQuery q)
Constructs a new query instance having the same criteria as the given query. |
|
JDOQLQuery(PersistenceManager pm,
java.lang.String query)
Constructor for a JDOQL query where the query is specified using the "Single-String" format. |
|
| Method Summary | |
|---|---|
void |
compile()
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 JDOQL. |
JDOQLResultSetMetaData |
getResultSetMetaData()
Retrieve the metadata for the results |
protected long |
performDeletePersistentAll(java.util.Map parameters)
Execute the query to delete persistent objects. |
protected java.util.Collection |
performExecute(java.util.Map parameters)
Execute the query and return the filtered QueryResult. |
static void |
registerScalarExpression(java.lang.Class literal,
java.lang.Class scalarExpressionClass,
java.lang.String name)
Register ScalarExpressions for the given cls. |
void |
setCandidates(java.util.Collection pcs)
Set the candidate Collection to query. |
void |
setCandidates(javax.jdo.Extent pcs)
Set the candidate Extent to query. |
protected boolean |
shouldReturnSingleRow()
Convenience method to return whether the query should return a single row. |
java.lang.String |
toString()
Stringifier method |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String[] SINGLE_STRING_KEYWORDS
protected static final java.lang.String[] SINGLE_STRING_KEYWORDS_LOWERCASE
protected transient javax.jdo.Extent candidateExtent
protected transient java.util.Collection candidateCollection
protected transient Queryable candidates
| Constructor Detail |
|---|
public JDOQLQuery(PersistenceManager pm)
pm - the associated persistence manager for this query.
public JDOQLQuery(PersistenceManager pm,
JDOQLQuery q)
pm - The PersistenceManagerq - The query from which to copy criteria.
public JDOQLQuery(PersistenceManager pm,
java.lang.String query)
pm - The persistence managerquery - The query string| Method Detail |
|---|
public static void registerScalarExpression(java.lang.Class literal,
java.lang.Class scalarExpressionClass,
java.lang.String name)
cls. It allows
to perform operations in the query on cls.method([arglist]).
literal - the class providing the operations; e.g. java.lang.Math.classscalarExpressionClass - the class with the corresponding ScalarExpression. eg. org.jpox.store.expression.MathExpression.classname - alternative name of the given literal classpublic boolean equals(java.lang.Object obj)
equals in class Queryobj - Object to compare against
Object.equals(java.lang.Object)public void setCandidates(javax.jdo.Extent pcs)
setCandidates in interface javax.jdo.QuerysetCandidates in class Querypcs - the Candidate Extent.Query.setCandidates(javax.jdo.Extent)public void setCandidates(java.util.Collection pcs)
setCandidates in interface javax.jdo.QuerysetCandidates in class Querypcs - the Candidate collection.Query.setCandidates(java.util.Collection)public void compile()
compile in interface javax.jdo.Querycompile in class QueryQuery.compile()protected void discardCompiled()
discardCompiled in class QueryQuery.discardCompiled()protected boolean shouldReturnSingleRow()
shouldReturnSingleRow in class Queryprotected java.util.Collection performExecute(java.util.Map parameters)
performExecute in class Queryparameters - Map containing all of the parameters.
protected long performDeletePersistentAll(java.util.Map parameters)
performDeletePersistentAll in class Queryparameters - the Map containing all of the parameters.
public JDOQLResultSetMetaData getResultSetMetaData()
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 | |||||||||