org.exolab.castor.jdo.engine

Class OQLQueryImpl

Implemented Interfaces:
OQLQuery, Query

public class OQLQueryImpl
extends java.lang.Object
implements Query, OQLQuery

An OQLQuery implementation to execute a query based upon an OQL statement
Version:
$Revision: 6230 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Assaf Arkin

Nested Class Summary

(package private) class
OQLQueryImpl.OQLEnumeration
java.util.Enumeration implementation to traverse the result as returned by the execution of the OQL query.

Constructor Summary

OQLQueryImpl(Database database)
Creates an instance to execute a query based upon an OQL statement

Method Summary

void
bind(Object value)
void
bind(boolean value)
void
bind(double value)
void
bind(float value)
void
bind(int value)
void
bind(long value)
void
bind(short value)
void
close()
void
create(String oql)
void
createCall(String oql)
QueryResults
execute()
QueryResults
execute(boolean scrollable)
QueryResults
execute(AccessMode accessMode)
QueryResults
execute(AccessMode accessMode, boolean scrollable)
String
getSQL()
Get the generated SQL statement for this OQLQuery

Constructor Details

OQLQueryImpl

(package private)  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

public void bind(Object value)
Specified by:
bind in interface Query
See Also:
org.exolab.castor.jdo.Query.bind(java.lang.Object)

bind

public void bind(boolean value)
Specified by:
bind in interface Query

bind

public void bind(double value)
Specified by:
bind in interface Query

bind

public void bind(float value)
Specified by:
bind in interface Query

bind

public void bind(int value)
Specified by:
bind in interface Query

bind

public void bind(long value)
Specified by:
bind in interface Query

bind

public void bind(short value)
Specified by:
bind in interface Query

close

public void close()
Specified by:
close in interface Query
See Also:
Query.close()

create

public void create(String oql)
            throws PersistenceException
Specified by:
create in interface OQLQuery
See Also:
org.exolab.castor.jdo.OQLQuery.create(java.lang.String)

createCall

public void createCall(String oql)
            throws QueryException
Parameters:
oql -
Throws:
QueryException -

execute

public QueryResults execute()
            throws QueryException,
                   PersistenceException,
                   TransactionNotInProgressException
Specified by:
execute in interface Query

execute

public QueryResults execute(boolean scrollable)
            throws QueryException,
                   PersistenceException,
                   TransactionNotInProgressException
Specified by:
execute in interface Query

execute

public QueryResults execute(AccessMode accessMode)
            throws QueryException,
                   PersistenceException,
                   TransactionNotInProgressException
Specified by:
execute in interface Query

execute

public QueryResults execute(AccessMode accessMode,
                            boolean scrollable)
            throws QueryException,
                   PersistenceException,
                   TransactionNotInProgressException
Specified by:
execute in interface Query

getSQL

public String getSQL()
            throws QueryException
Get the generated SQL statement for this OQLQuery
Returns:
A SQL statement.
Throws:
QueryException - If the SQL query cannot be generated.

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