Method Summary |
|
public void | addExtension(String key, Object value) Add a vendor-specific extension this query. |
public void | addSubquery(Query sub, String variableDecl, String candidateExpr, Map paramMap) Method to add a subquery to this query. |
protected boolean | applyRangeChecks() Method to return if the query results should have the range checked and unnecessary rows
discarded. |
protected void | assertIsModifiable() Method to throw a JPOXUserException if the query is currently not modifiable. |
public void | close(Object queryResult) Close a query result and release any resources associated with it. |
public void | closeAll() Close all query results associated with this Query instance,
and release all resources associated with them. |
public void | compile() Verify the elements of the query and provide a hint to the query to prepare and optimize an execution plan. |
abstract protected void | compileInternal(boolean forExecute, Map parameterValues) Method to compile the query. |
public void | declareExplicitParameters(String parameters) Method to define the explicit parameters. |
public void | declareExplicitVariables(String variables) Method to define the explicit variables for the query. |
public void | declareImports(String imports) Set the import statements to be used to identify the fully qualified name
of variables or parameters. |
public long | deletePersistentAll() Method to delete all objects found by this query, catering for cascade changes and updates
to in-memory objects. |
public long | deletePersistentAll(Object[] parameters) Method to delete all objects found by this query, catering for cascade changes and updates
to in-memory objects.
Parameters: parameters - the Object array with all of the parameters. |
public long | deletePersistentAll(Map parameters) Method to delete all objects found by this query, catering for cascade changes and updates
to in-memory objects. |
protected void | discardCompiled() Utility to remove any previous compilation of this Query. |
public boolean | equals(Object obj) Equality operator. |
public Object | execute() Execute the query and return the filtered List. |
public Object | execute(Object p1) Execute the query and return the filtered List.
Parameters: p1 - the value of the first parameter declared. |
public Object | execute(Object p1, Object p2) Execute the query and return the filtered List.
Parameters: p1 - the value of the first parameter declared. Parameters: p2 - the value of the second parameter declared. |
public Object | execute(Object p1, Object p2, Object p3) Execute the query and return the filtered List.
Parameters: p1 - the value of the first parameter declared. Parameters: p2 - the value of the second parameter declared. Parameters: p3 - the value of the third parameter declared. |
public Object | executeWithArray(Object[] parameterValues) Execute the query and return the filtered List.
Parameters: parameterValues - the Object array with all of the parameters. |
public Object | executeWithMap(Map parameters) Execute the query and return the filtered result(s).
Parameters: parameters - the Map containing all of the parameters. |
public Class | getCandidateClass() Accessor for the class of the candidate instances of the query. |
public String | getCandidateClassName() Accessor for the candidate class name. |
public String | getExplicitParameters() Accessor for the explicit parameters specification. |
public String | getExplicitVariables() Accessor for the explicit variables specification. |
public Object | getExtension(String key) Accessor for the value of an extension for this query. |
public FetchPlan | getFetchPlan() This method retrieves the fetch plan associated with the Query. |
public String | getFilter() Accessor for the filter specification. |
public String | getFrom() Accessor for the FROM clause of the query. |
public String | getGrouping() Accessor for the grouping string for the query. |
public String | getHaving() Accessor for the having string for the query. |
public boolean | getIgnoreCache() Accessor for the ignoreCache option setting. |
public String | getImports() Accessor for the imports specification. |
public ObjectManager | getObjectManager() Accessor for the PersistenceManager associated with this Query. |
public String | getOrdering() Accessor for the ordering string for the query. |
protected Imports | getParsedImports() Accessor for the parsed imports. |
public String | getRange() Accessor for the range specification. |
public long | getRangeFromIncl() Accessor for the range lower limit (inclusive). |
public long | getRangeToExcl() Accessor for the range upper limit (exclusive). |
public String | getResult() Accessor for the result specification string. |
public Class | getResultClass() Accessor for the result class. |
public String | getResultClassName() Accessor for the name of the result class. |
public StoreManager | getStoreManager() Accessor for the StoreManager associated with this Query. |
public SubqueryDefinition | getSubqueryForVariable(String variableName) Accessor for the subquery for the supplied variable. |
public short | getType() Accessor for the query type. |
public boolean | hasSubqueryForVariable(String variableName) Accessor for whether there is a subquery for the specified variable name. |
public int | hashCode() Hashcode generator. |
public boolean | isCompiled() Accessor for whether the query is compiled. |
public boolean | isSubclasses() |
public boolean | isUnique() Accessor for whether the query results are unique. |
public boolean | isUnmodifiable() Accessor for unmodifiable. |
abstract protected long | performDeletePersistentAll(Map parameters) Method to actually execute the deletion of objects.
To be implemented by extending classes.
Parameters: parameters - Map containing the parameters. |
abstract protected Object | performExecute(Map parameters) Method to actually execute the query. |
protected void | prepareDatastore() Convenience method that will flush any outstanding updates to the datastore. |
public Class | resolveClassDeclaration(String classDecl) Utility to resolve the declaration to a particular class. |
public void | setCandidateClassName(String candidateClassName) Convenience method to set the name of the candidate class. |
abstract public void | setCandidates(Extent pcs) Set the candidate Extent to query. |
abstract public void | setCandidates(Collection pcs) Set the candidate Collection to query. |
public void | setClass(Class candidateClass) Mutator for the class of the candidate instances of the query. |
public void | setExtensions(Map extensions) Set multiple extensions, or use null to clear extensions. |
public void | setFetchPlan(FetchPlan fp) Mutator for the FetchPlan of the query. |
public void | setFilter(String filter) Set the filter for the query. |
public void | setFrom(String from) Set the candidates to the query. |
public void | setGrouping(String grouping) Set the grouping specification for the result Collection. |
public void | setHaving(String having) Set the having specification for the result Collection. |
public void | setIgnoreCache(boolean ignoreCache) Set the ignoreCache option. |
public void | setImplicitParameter(String name, Object value) Method to set the value of a named implicit parameter where known before execution. |
public void | setImplicitParameter(int position, Object value) Method to set the value of a numbered implicit parameter where known before execution. |
public void | setOrdering(String ordering) Set the ordering specification for the result Collection. |
public void | setRange(long fromIncl, long toExcl) Set the range of the results. |
public void | setRange(String range) Set the range of the results. |
public void | setResult(String result) Set the result for the results. |
public void | setResultClass(Class result_cls) Set the result class for the results. |
public void | setResultClassName(String resultClassName) Convenience method to set the name of the result class. |
public void | setResultMetaData(QueryResultMetaData qrmd) Method to set the MetaData defining the result. |
public void | setSubclasses(boolean subclasses) |
public void | setType(short type) Mutator to set the query type. |
public void | setUnique(boolean unique) Set the uniqueness of the results. |
public void | setUnmodifiable() Mutator for unmodifiable. |
abstract protected boolean | shouldReturnSingleRow() Convenience method to return whether the query should return a single row. |