Modifier and Type | Method and Description |
---|---|
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.
|
void |
create(String oql)
Creates an OQL query from the supplied statement.
|
void |
createCall(String oql) |
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.
|
String |
getSQL()
Get the generated SQL statement for this OQLQuery.
|
public void bind(Object value)
Query
bind
in interface Query
value
- The parameter valueQuery.bind(java.lang.Object)
public void bind(boolean value)
Query
public void bind(short value)
Query
public void bind(int value)
Query
public void bind(long value)
Query
public void bind(float value)
Query
public void bind(double value)
Query
public void create(String oql) throws PersistenceException
OQLQuery
create
in interface OQLQuery
oql
- An OQL query statementPersistenceException
public void createCall(String oql) throws QueryException
oql
- QueryException
public QueryResults execute() throws PersistenceException
Query
After execution the parameter list is reset. New parameters can be bound and the query re-executed.
execute
in interface Query
QueryException
- The query expression cannot be processed,
or the query parameters are invalidTransactionNotInProgressException
- Method called while
transaction is not in progressPersistenceException
- An error reported by the
persistence engineQuery.execute()
public QueryResults execute(boolean scrollable) throws PersistenceException
Query
execute
in interface Query
PersistenceException
Query.execute(boolean)
public QueryResults execute(AccessMode accessMode) throws PersistenceException
Query
After execution the parameter list is reset. New parameters can be bound and the query re-executed.
execute
in interface Query
accessMode
- The access modeQueryException
- The query expression cannot be processed,
or the query parameters are invalidTransactionNotInProgressException
- Method called while
transaction is not in progressPersistenceException
- An error reported by the
persistence engineQuery.execute(org.exolab.castor.mapping.AccessMode)
public QueryResults execute(AccessMode accessMode, boolean scrollable) throws PersistenceException
Query
execute
in interface Query
PersistenceException
Query.execute(org.exolab.castor.mapping.AccessMode, boolean)
public String getSQL() throws QueryException
QueryException
- If the SQL query cannot be generated.Copyright © 2016. All rights reserved.