org.exolab.castor.jdo.engine
Class OQLQueryImpl

java.lang.Object
  extended by org.exolab.castor.jdo.engine.OQLQueryImpl
All Implemented Interfaces:
OQLQuery, Query

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

Version:
$Revision: 1.15 $ $Date: 2005/06/20 12:00:55 $
Author:
Assaf Arkin

Nested Class Summary
(package private)  class OQLQueryImpl.OQLEnumeration
           
 
Constructor Summary
OQLQueryImpl(DatabaseImpl dbImpl)
           
 
Method Summary
 void bind(boolean value)
          Bind a parameter value to the query.
 void bind(double value)
          Bind a parameter value to the query.
 void bind(float value)
          Bind a parameter value to the query.
 void bind(int value)
          Bind a parameter value to the query.
 void bind(long value)
          Bind a parameter value to the query.
 void bind(java.lang.Object value)
          Bind a parameter value to the query.
 void bind(short value)
          Bind a parameter value to the query.
 void close()
          Close the query and release all resources held by the query.
 void create(java.lang.String oql)
          Creates an OQL query from the supplied statement.
 void createCall(java.lang.String oql)
           
 QueryResults execute()
          Execute the query.
 QueryResults execute(AccessMode accessMode)
          Experimental
 QueryResults execute(AccessMode accessMode, boolean scrollable)
          Experimental This is used for cursor support
 QueryResults execute(boolean scrollable)
          Experimental This is used for cursor support
 QueryResults execute(short accessMode)
          Experimental
 QueryResults execute(short accessMode, boolean scrollable)
          Experimental This is used for cursor support
 java.lang.String getSQL()
          Get the generated SQL statement for this OQLQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OQLQueryImpl

OQLQueryImpl(DatabaseImpl dbImpl)
Method Detail

bind

public void bind(java.lang.Object value)
Description copied from interface: Query
Bind 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.

Specified by:
bind in interface Query
Parameters:
value - The parameter value

bind

public void bind(boolean value)
Description copied from interface: Query
Bind 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.

Specified by:
bind in interface Query
Parameters:
value - The parameter value

bind

public void bind(short value)
Description copied from interface: Query
Bind 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.

Specified by:
bind in interface Query
Parameters:
value - The parameter value

bind

public void bind(int value)
Description copied from interface: Query
Bind 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.

Specified by:
bind in interface Query
Parameters:
value - The parameter value

bind

public void bind(long value)
Description copied from interface: Query
Bind 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.

Specified by:
bind in interface Query
Parameters:
value - The parameter value

bind

public void bind(float value)
Description copied from interface: Query
Bind 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.

Specified by:
bind in interface Query
Parameters:
value - The parameter value

bind

public void bind(double value)
Description copied from interface: Query
Bind 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.

Specified by:
bind in interface Query
Parameters:
value - The parameter value

create

public void create(java.lang.String oql)
            throws PersistenceException
Description copied from interface: OQLQuery
Creates an OQL query from the supplied statement.

Specified by:
create in interface OQLQuery
Parameters:
oql - An OQL query statement
Throws:
PersistenceException

createCall

public void createCall(java.lang.String oql)
                throws QueryException
Throws:
QueryException

execute

public QueryResults execute()
                     throws QueryException,
                            PersistenceException,
                            TransactionNotInProgressException
Description copied from interface: Query
Execute 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:
execute in interface Query
Returns:
Query results (zero or more objects)
Throws:
QueryException - The query expression cannot be processed, or the query parameters are invalid
TransactionNotInProgressException - Method called while transaction is not in progress
PersistenceException - An error reported by the persistence engine

execute

public QueryResults execute(boolean scrollable)
                     throws QueryException,
                            PersistenceException,
                            TransactionNotInProgressException
Description copied from interface: Query
Experimental This is used for cursor support

Specified by:
execute in interface Query
Throws:
QueryException
PersistenceException
TransactionNotInProgressException

execute

public QueryResults execute(short accessMode)
                     throws QueryException,
                            PersistenceException,
                            TransactionNotInProgressException
Description copied from interface: Query
Experimental

Execute 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:
execute in interface Query
Parameters:
accessMode - The access mode
Returns:
Query results (zero or more objects)
Throws:
QueryException - The query expression cannot be processed, or the query parameters are invalid
TransactionNotInProgressException - Method called while transaction is not in progress
PersistenceException - An error reported by the persistence engine

execute

public QueryResults execute(short accessMode,
                            boolean scrollable)
                     throws QueryException,
                            PersistenceException,
                            TransactionNotInProgressException
Description copied from interface: Query
Experimental This is used for cursor support

Specified by:
execute in interface Query
Throws:
QueryException
PersistenceException
TransactionNotInProgressException

execute

public QueryResults execute(AccessMode accessMode)
                     throws QueryException,
                            PersistenceException,
                            TransactionNotInProgressException
Description copied from interface: Query
Experimental

Execute 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:
execute in interface Query
Parameters:
accessMode - The access mode
Returns:
Query results (zero or more objects)
Throws:
QueryException - The query expression cannot be processed, or the query parameters are invalid
TransactionNotInProgressException - Method called while transaction is not in progress
PersistenceException - An error reported by the persistence engine

execute

public QueryResults execute(AccessMode accessMode,
                            boolean scrollable)
                     throws QueryException,
                            PersistenceException,
                            TransactionNotInProgressException
Description copied from interface: Query
Experimental This is used for cursor support

Specified by:
execute in interface Query
Throws:
QueryException
PersistenceException
TransactionNotInProgressException

getSQL

public java.lang.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.

close

public void close()
Description copied from interface: Query
Close the query and release all resources held by the query.

Specified by:
close in interface Query


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