|
|||||||||||
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
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 FormNested Class Summary |
Nested classes 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 querypublic SQLQuery(PersistenceManager pm, java.lang.String sql_text)
pm
- The PersistenceManagersql_text
- The SQL query stringMethod Detail |
public boolean equals(java.lang.Object obj)
equals
in class Query
obj
- 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.Query
declareParameters
in class Query
parameters
- 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.Query
declareImports
in class Query
imports
- import statements separated by semicolons.
javax.jdo.JDOUserException
- Always thrown.Query.declareImports(java.lang.String)
protected void generateQueryStatement()
generateQueryStatement
in class BaseSQLQuery
public java.lang.Object executeWithArray(java.lang.Object[] parameters)
executeWithArray
in interface javax.jdo.Query
executeWithArray
in class Query
parameters
- 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.Query
executeWithMap
in class Query
parameterMap
- the Map with all of the parameters.
Query.executeWithArray(Object[])
public java.util.Collection performExecute(java.util.Map parameters)
performExecute
in class BaseSQLQuery
parameters
- the Map containing all of the parameters.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |