|
||||||||||
| 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.rdbms.query.BaseSQLQuery
org.jpox.store.rdbms.query.SQLQuery
public final class SQLQuery
A Query using SQL, and keeping to the JDO2 definition of a SQL query. The majority of this has to be specified in the query filter itself. Parameters are embodied in the query and are unnamed/untyped. There are no variables/imports. Ordering/grouping is explicit in the query.
Query,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jpox.store.query.Query |
|---|
Query.ResultObjectFactory |
| Field Summary |
|---|
| Fields inherited from class org.jpox.store.rdbms.query.BaseSQLQuery |
|---|
fieldColumnNames, fieldNumbers, jdbcSqlText, LOCALISER_RDBMS, sqlText, statementExpressionIndex |
| 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 | |
|---|---|
SQLQuery(PersistenceManager pm,
SQLQuery query)
Constructor for a new query using the existing query. |
|
SQLQuery(PersistenceManager pm,
java.lang.String sql_text)
Constructs a new query instance having the same criteria as the given query. |
|
| Method Summary | |
|---|---|
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 parameters to be used in the query. |
boolean |
equals(java.lang.Object obj)
Equality operator |
java.lang.Object |
executeWithArray(java.lang.Object[] parameters)
Execute the query and return the filtered List. |
java.lang.Object |
executeWithMap(java.util.Map parameterMap)
Execute the query and return the filtered List. |
protected void |
generateQueryStatement()
Method to perform any necessary pre-processing on the users query statement before we execute it. |
java.util.Collection |
performExecute(java.util.Map parameters)
Execute the query and return the filtered QueryResult. |
| Methods inherited from class org.jpox.store.rdbms.query.BaseSQLQuery |
|---|
compile, declareVariables, discardCompiled, getQueryResultForNoCandidateClass, performDeletePersistentAll, setCandidates, setCandidates, setFilter, setGrouping, setOrdering, setRange, setResult, setSubclasses, shouldReturnSingleRow |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SQLQuery(PersistenceManager pm,
SQLQuery query)
pm - Persistence Managerquery - The existing query
public SQLQuery(PersistenceManager pm,
java.lang.String sql_text)
pm - The PersistenceManagersql_text - The SQL query string| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class Queryobj - The object to compare against
public void declareParameters(java.lang.String parameters)
This implementation always throws a JDOUserException since this concept doesn't apply to SQL queries.
declareParameters in interface javax.jdo.QuerydeclareParameters in class Queryparameters - the parameters separated by semicolons.
javax.jdo.JDOUserException - Always thrown.Query.declareVariables(java.lang.String)public void declareImports(java.lang.String imports)
This implementation always throws a JDOUserException since this concept doesn't apply to SQL queries.
declareImports in interface javax.jdo.QuerydeclareImports in class Queryimports - import statements separated by semicolons.
javax.jdo.JDOUserException - Always thrown.Query.declareImports(java.lang.String)protected void generateQueryStatement()
generateQueryStatement in class BaseSQLQuerypublic java.lang.Object executeWithArray(java.lang.Object[] parameters)
executeWithArray in interface javax.jdo.QueryexecuteWithArray in class Queryparameters - the Object array with all of the parameters.
Query.executeWithArray(Object[])public java.lang.Object executeWithMap(java.util.Map parameterMap)
executeWithMap in interface javax.jdo.QueryexecuteWithMap in class QueryparameterMap - the Map with all of the parameters.
Query.executeWithArray(Object[])public java.util.Collection performExecute(java.util.Map parameters)
performExecute in class BaseSQLQueryparameters - the Map containing all of the parameters.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||