|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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(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. |
QueryResults |
execute()
Execute the query. |
QueryResults |
execute(short accessMode)
Experimental |
Method Detail |
public void bind(java.lang.Object value) throws java.lang.IllegalArgumentException
value
- The parameter valuepublic void bind(boolean value) throws java.lang.IllegalArgumentException
value
- The parameter valuepublic void bind(short value) throws java.lang.IllegalArgumentException
value
- The parameter valuepublic void bind(int value) throws java.lang.IllegalArgumentException
value
- The parameter valuepublic void bind(long value) throws java.lang.IllegalArgumentException
value
- The parameter valuepublic void bind(float value) throws java.lang.IllegalArgumentException
value
- The parameter valuepublic void bind(double value) throws java.lang.IllegalArgumentException
value
- The parameter valuepublic QueryResults execute() throws QueryException, PersistenceException, TransactionNotInProgressException
After execution the parameter list is reset. New parameters can be bound and the query re-executed.
public QueryResults execute(short accessMode) throws QueryException, PersistenceException, TransactionNotInProgressException
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.
accessMode
- The access modepublic void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |