Package rasj.odmg
Class RasOQLQuery
- java.lang.Object
-
- rasj.odmg.RasOQLQuery
-
- All Implemented Interfaces:
OQLQuery,RasCommDefs
public class RasOQLQuery extends java.lang.Object implements OQLQuery, RasCommDefs
This class implements the ODMG OQLQuery interface.- Author:
- Peter Zoller
-
-
Field Summary
-
Fields inherited from interface rasj.clientcommhttp.RasCommDefs
BIG_ENDIAN, BROWSER, LITTLE_ENDIAN, RASCLIENT, RESPONSE_ERROR, RESPONSE_INT, RESPONSE_MDDS, RESPONSE_OID, RESPONSE_OK, RESPONSE_OK_NEGATIVE, RESPONSE_SKALARS
-
-
Constructor Summary
Constructors Constructor Description RasOQLQuery(RasImplementationInterface imp)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(java.lang.Object parameter)Binds a parameter to the query.voidcreate(java.lang.String query)Defines the query to be executed.java.lang.Objectexecute()Execute the OQL query.
-
-
-
Constructor Detail
-
RasOQLQuery
public RasOQLQuery(RasImplementationInterface imp)
Constructor
-
-
Method Detail
-
create
public void create(java.lang.String query) throws QueryInvalidExceptionDefines the query to be executed.- Specified by:
createin interfaceOQLQuery- Parameters:
query- The OQL query string.- Throws:
QueryInvalidException- The query syntax is invalid.
-
bind
public void bind(java.lang.Object parameter) throws QueryParameterCountInvalidException, QueryParameterTypeInvalidExceptionBinds a parameter to the query.- Specified by:
bindin interfaceOQLQuery- Parameters:
parameter- A value to be substituted for a query parameter.- Throws:
QueryParameterCountInvalidException- The number of calls tobindhas exceeded the number of parameters in the query.QueryParameterTypeInvalidException- The type of the parameter does not correspond with the type of the parameter in the query.
-
execute
public java.lang.Object execute() throws QueryExceptionExecute the OQL query.- Specified by:
executein interfaceOQLQuery- Returns:
- The object that represents the result of the query.
The returned data, whatever its OQL type, is encapsulated into an object.
For instance, when OQL returns an integer, the result is put into an
Integerobject. When OQL returns a collection (literal or object), the result is always a Java collection object of the same kind (for instance, aDList). - Throws:
QueryException- An exception has occurred while executing the query.
-
-