|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.query.Query
org.datanucleus.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.datanucleus.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 QueryResultsMetaData |
resultMetaData
Result metadata (extension, allowing access to more info about results). |
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.datanucleus.store.query.Query |
|---|
BULK_DELETE, BULK_UPDATE, candidateClass, candidateClassName, compilation, explicitParameters, explicitVariables, extensions, filter, from, fromInclNo, grouping, having, ignoreCache, IMPLICIT_POSITIONAL_PARAM_PREFIX, implicitParameters, imports, LOCALISER, om, ordering, parameterNames, parsedImports, queryResults, range, result, resultClass, resultClassName, resultDistinct, 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. |
protected boolean |
evaluateInMemory()
Convenience method to return whether the query should be evaluated in-memory. |
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. |
QueryResultsMetaData |
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. |
protected long |
performDeletePersistentAll(java.util.Map parameters)
Execute the query to delete persistent objects. |
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. |
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 java.lang.String singleString
protected transient QueryResultsMetaData resultMetaData
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 QueryResultsMetaData getResultSetMetaData()
protected long performDeletePersistentAll(java.util.Map parameters)
performDeletePersistentAll in class Queryparameters - the Map containing all of the parameters.
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.datanucleus.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()
protected boolean evaluateInMemory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||