Package org.exolab.castor.jdo.engine
Class SimpleQueryExecutor
java.lang.Object
org.exolab.castor.jdo.engine.SimpleQueryExecutor
A class to execute simple SQL queries generated from OQL. If the query
only returns dependant values, or the results of SQL Functions or
operations, then we don't need to use the whole persistence framework,
and this class will execute the query, and return results.
- Version:
- $Revision: 7130 $ $Date: 2006-03-14 06:22:05 -0700 (Tue, 14 Mar 2006) $
- Author:
- Nissim Karpenstein
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSimpleQueryExecutor
(Database database) Creates an instance to execute a simple query. -
Method Summary
Modifier and TypeMethodDescriptionexecute
(Connection conn, QueryExpression expr, Object[] bindValues) Executes a simple query and returns the results.
-
Constructor Details
-
SimpleQueryExecutor
Creates an instance to execute a simple query.- Parameters:
database
- the Database Implementation, used to get the connection
-
-
Method Details
-
execute
public QueryResults execute(Connection conn, QueryExpression expr, Object[] bindValues) throws QueryException Executes a simple query and returns the results. The query must not return any complex objects, because this method can only return simple java objects.- Parameters:
expr
- the Query Expression to be executed.bindValues
- the values of the parameters- Returns:
- the results of the query.
- Throws:
QueryException
- if anything goes wrong.
-