|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Query
A query object. Obtained from the database and used to construct and execute a query on that database. All query operations are bound to the database transaction. Closing the database or the transaction will effectively close the query.
If the query specified parameters these parameters must be set
(bound) before executing the query. Execution of the query will
result in an enumeration of all the objects found by the query.
The query can be re-executed by binding new parameters and calling
the execute() method a second time. A query can be
re-execute while objects are still retrieved from a previous
execution.
OQLQuery,
Database.getQuery()| 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(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. |
QueryResults |
execute()
Execute the query. |
QueryResults |
execute(AccessMode accessMode)
Execute the query. |
QueryResults |
execute(AccessMode accessMode,
boolean scrollable)
This is used for cursor support. |
QueryResults |
execute(boolean scrollable)
This is used for cursor support. |
| Method Detail |
|---|
void bind(Object value)
throws IllegalArgumentException
value - The parameter value
IllegalArgumentException - The parameter is not of the
expected type, or more parameters were supplied that the
query specified
void bind(boolean value)
throws IllegalArgumentException
value - The parameter value
IllegalArgumentException - The parameter is not of the
expected type, or more parameters were supplied that the
query specified
void bind(short value)
throws IllegalArgumentException
value - The parameter value
IllegalArgumentException - The parameter is not of the
expected type, or more parameters were supplied that the
query specified
void bind(int value)
throws IllegalArgumentException
value - The parameter value
IllegalArgumentException - The parameter is not of the
expected type, or more parameters were supplied that the
query specified
void bind(long value)
throws IllegalArgumentException
value - The parameter value
IllegalArgumentException - The parameter is not of the
expected type, or more parameters were supplied that the
query specified
void bind(float value)
throws IllegalArgumentException
value - The parameter value
IllegalArgumentException - The parameter is not of the
expected type, or more parameters were supplied that the
query specified
void bind(double value)
throws IllegalArgumentException
value - The parameter value
IllegalArgumentException - The parameter is not of the
expected type, or more parameters were supplied that the
query specified
QueryResults execute()
throws PersistenceException
After execution the parameter list is reset. New parameters can be bound and the query re-executed.
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
QueryResults execute(boolean scrollable)
throws PersistenceException
PersistenceException
QueryResults execute(AccessMode accessMode)
throws PersistenceException
After execution the parameter list is reset. New parameters can be bound and the query re-executed.
accessMode - The access mode
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
QueryResults execute(AccessMode accessMode,
boolean scrollable)
throws PersistenceException
PersistenceExceptionvoid close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||