org.exolab.castor.jdo.engine
Class SimpleQueryExecutor

java.lang.Object
  extended by org.exolab.castor.jdo.engine.SimpleQueryExecutor

public class SimpleQueryExecutor
extends java.lang.Object

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: 1.7 $ $Date: 2005/07/15 21:59:16 $
Author:
Nissim Karpenstein

Nested Class Summary
 class SimpleQueryExecutor.SimpleQueryResults
           
 
Constructor Summary
SimpleQueryExecutor(DatabaseImpl dbImpl)
          Constructor to create an object to execute a simple query.
 
Method Summary
 QueryResults execute(java.sql.Connection conn, QueryExpression expr, java.lang.Object[] bindValues)
          Executes a simple query and returns the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleQueryExecutor

public SimpleQueryExecutor(DatabaseImpl dbImpl)
Constructor to create an object to execute a simple query.

Parameters:
dbImpl - the Database Implementation, used to get the connection
Method Detail

execute

public QueryResults execute(java.sql.Connection conn,
                            QueryExpression expr,
                            java.lang.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.


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com