|
||||||||||
| 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.AbstractJavaQuery
public abstract class AbstractJavaQuery
Abstract representation of a Java-based query. To be extended by Java-based query languages.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jpox.store.query.Query |
|---|
Query.SubqueryDefinition |
| Field Summary | |
|---|---|
protected java.util.Collection |
candidateCollection
Collection of candidates for this query. |
protected Extent |
candidateExtent
Extent of candidates for this query. |
protected boolean |
distinct
whether to apply "distinct" results. |
protected JPOXResultSetMetaData |
resultMetaData
Result metadata (JPOX extension, allowing access to more info). |
protected ResultObjectFactory |
rof
Factory for obtaining the results from the query result set. |
protected java.lang.String |
singleString
Cached form of the single string form of the query. |
protected static java.util.Map |
userDefinedScalarExpressions
Register of user-defined ScalarExpression, provided via plugins. |
| Fields inherited from class org.jpox.store.query.Query |
|---|
BULK_DELETE, BULK_UPDATE, candidateClass, candidateClassName, explicitParameters, explicitVariables, extensions, filter, from, fromInclNo, grouping, having, ignoreCache, implicitParameters, imports, isCompiled, LOCALISER, om, ordering, parameterNames, parsedImports, queryResults, range, result, resultClass, resultClassName, SELECT, subclasses, subqueries, toExclNo, type, unique, unmodifiable, update |
| Constructor Summary | |
|---|---|
AbstractJavaQuery(ObjectManager om)
Constructor for a Java-based query. |
|
| Method Summary | |
|---|---|
protected void |
discardCompiled()
Method to discard our current compiled query due to changes. |
java.util.Collection |
getCandidateCollection()
Accessor for the candidate collection (if specified using a collection). |
Extent |
getCandidateExtent()
Accessor for the candidate Extent (if specified using an Extent). |
Imports |
getParsedImports()
Accessor for the parsed imports. |
JPOXResultSetMetaData |
getResultSetMetaData()
Retrieve the metadata for the results |
abstract java.lang.String |
getSingleStringQuery()
Accessor for a single string form of the query. |
static java.util.Map |
getUserDefinedScalarExpressions()
Accessor for the user-defined scalar expressions. |
static void |
registerScalarExpression(java.lang.Class literal,
java.lang.Class scalarExpressionClass,
java.lang.String name)
Register ScalarExpressions for the given cls. |
protected void |
registerScalarExpressions(PluginManager pluginMgr,
ClassLoaderResolver clr)
Register ScalarExpression classes delcared as plug-ins extensions TODO currently register only the first time this class is instantiated. |
boolean |
resultHasOnlyAggregates(java.lang.String result)
Convenience method to simple-parse the "result" clause returning if it includes solely aggregates. |
void |
setCandidates(java.util.Collection pcs)
Set the candidate Collection to query. |
void |
setCandidates(Extent pcs)
Set the candidate Extent to query. |
java.lang.String |
toString()
Stringifier method |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient Extent candidateExtent
protected transient java.util.Collection candidateCollection
protected transient ResultObjectFactory rof
protected transient boolean distinct
protected transient JPOXResultSetMetaData resultMetaData
protected java.lang.String singleString
protected static transient java.util.Map userDefinedScalarExpressions
| Constructor Detail |
|---|
public AbstractJavaQuery(ObjectManager om)
om - The ObjectManager| Method Detail |
|---|
public void setCandidates(Extent pcs)
setCandidates in class Querypcs - the Candidate Extent.Query.setCandidates(javax.jdo.Extent)public void setCandidates(java.util.Collection pcs)
setCandidates in class Querypcs - the Candidate collection.Query.setCandidates(java.util.Collection)public Extent getCandidateExtent()
public java.util.Collection getCandidateCollection()
protected void discardCompiled()
discardCompiled in class QueryQuery.discardCompiled()public Imports getParsedImports()
getParsedImports in class Querypublic JPOXResultSetMetaData getResultSetMetaData()
public boolean resultHasOnlyAggregates(java.lang.String result)
result - The result required
public abstract java.lang.String getSingleStringQuery()
public java.lang.String toString()
toString in class java.lang.Object
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 class
protected void registerScalarExpressions(PluginManager pluginMgr,
ClassLoaderResolver clr)
pluginMgr - The PluginManagerclr - The ClassLoaderResolver to load the literal and ScalarExpression classespublic static java.util.Map getUserDefinedScalarExpressions()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||