Package org.exolab.castor.jdo.engine
Class OQLQueryImpl
java.lang.Object
org.exolab.castor.jdo.engine.OQLQueryImpl
An OQLQuery implementation to execute a query based upon an OQL statement.
- Version:
- $Revision: 8141 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Assaf Arkin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classEnumerationimplementation to traverse the result as returned by the execution of the OQL query. -
Constructor Summary
ConstructorsConstructorDescriptionOQLQueryImpl(Database database) Creates an instance to execute a query based upon an OQL statement. -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(boolean value) Bind a parameter value to the query.voidbind(double value) Bind a parameter value to the query.voidbind(float value) Bind a parameter value to the query.voidbind(int value) Bind a parameter value to the query.voidbind(long value) Bind a parameter value to the query.voidbind(short value) Bind a parameter value to the query.voidBind a parameter value to the query.voidclose()Close the query and release all resources held by the query.voidCreates an OQL query from the supplied statement.voidcreateCall(String oql) execute()Execute the query.execute(boolean scrollable) This is used for cursor support.execute(AccessMode accessMode) Execute the query.execute(AccessMode accessMode, boolean scrollable) This is used for cursor support.getSQL()Get the generated SQL statement for this OQLQuery.
-
Constructor Details
-
OQLQueryImpl
OQLQueryImpl(Database database) Creates an instance to execute a query based upon an OQL statement.- Parameters:
database- The Castor database to run the query against.
-
-
Method Details
-
bind
Description copied from interface:QueryBind a parameter value to the query. Parameters are set in the order in which they appear in the query and must match in number and type of each parameter. -
bind
public void bind(boolean value) Description copied from interface:QueryBind a parameter value to the query. Parameters are set in the order in which they appear in the query and must match in number and type of each parameter. -
bind
public void bind(short value) Description copied from interface:QueryBind a parameter value to the query. Parameters are set in the order in which they appear in the query and must match in number and type of each parameter. -
bind
public void bind(int value) Description copied from interface:QueryBind a parameter value to the query. Parameters are set in the order in which they appear in the query and must match in number and type of each parameter. -
bind
public void bind(long value) Description copied from interface:QueryBind a parameter value to the query. Parameters are set in the order in which they appear in the query and must match in number and type of each parameter. -
bind
public void bind(float value) Description copied from interface:QueryBind a parameter value to the query. Parameters are set in the order in which they appear in the query and must match in number and type of each parameter. -
bind
public void bind(double value) Description copied from interface:QueryBind a parameter value to the query. Parameters are set in the order in which they appear in the query and must match in number and type of each parameter. -
create
Description copied from interface:OQLQueryCreates an OQL query from the supplied statement.- Specified by:
createin interfaceOQLQuery- Parameters:
oql- An OQL query statement- Throws:
PersistenceException
-
createCall
- Parameters:
oql-- Throws:
QueryException
-
execute
Description copied from interface:QueryExecute the query. The query is executed returning an enumeration of all the objects found. If no objects were found, the enumeration will be empty.After execution the parameter list is reset. New parameters can be bound and the query re-executed.
- Specified by:
executein interfaceQuery- Returns:
- Query results (zero or more objects)
- Throws:
PersistenceException- An error reported by the persistence engine
-
execute
Description copied from interface:QueryThis is used for cursor support. Experimental- Specified by:
executein interfaceQuery- Throws:
PersistenceException
-
execute
Description copied from interface:QueryExecute the query. The query is executed returning an enumeration of all the objects found. If no objects were found, the enumeration will be empty.After execution the parameter list is reset. New parameters can be bound and the query re-executed.
- Specified by:
executein interfaceQuery- Parameters:
accessMode- The access mode- Returns:
- Query results (zero or more objects)
- Throws:
PersistenceException- An error reported by the persistence engine
-
execute
Description copied from interface:QueryThis is used for cursor support. Experimental- Specified by:
executein interfaceQuery- Throws:
PersistenceException
-
getSQL
Get the generated SQL statement for this OQLQuery.- Returns:
- A SQL statement.
- Throws:
QueryException- If the SQL query cannot be generated.
-
close
public void close()Description copied from interface:QueryClose the query and release all resources held by the query.
-