|
EclipseLink 2.0.0_ 2.0.0.v20090626-r4569 API Reference | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TypedQuery<X>
| Method Summary | ||
|---|---|---|
java.util.List<X> |
getResultList()
Execute a SELECT query and return the query results as a typed List. |
|
X |
getSingleResult()
Execute a SELECT query that returns a single result. |
|
TypedQuery<X> |
setFirstResult(int startPosition)
Set the position of the first result to retrieve. |
|
TypedQuery<X> |
setFlushMode(FlushModeType flushMode)
Set the flush mode type to be used for the query execution. |
|
TypedQuery<X> |
setHint(java.lang.String hintName,
java.lang.Object value)
Set a query hint. |
|
TypedQuery<X> |
setLockMode(LockModeType lockMode)
Set the lock mode type to be used for the query execution. |
|
TypedQuery<X> |
setMaxResults(int maxResult)
Set the maximum number of results to retrieve. |
|
|
setParameter(Parameter<T> param,
T value)
Set the value of a Parameter object. |
|
| Methods inherited from interface javax.persistence.Query |
|---|
executeUpdate, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameters, getParameterValue, getSupportedHints, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, unwrap |
| Method Detail |
|---|
java.util.List<X> getResultList()
getResultList in interface Queryjava.lang.IllegalStateException - if called for a Java
Persistence query language UPDATE or DELETE statement
QueryTimeoutException - if the query execution exceeds
the query timeout value set
TransactionRequiredException - if a lock mode has
been set and there is no transaction
PessimisticLockException - if pessimistic locking
fails and the transaction is rolled back
LockTimeoutException - if pessimistic locking
fails and only the statement is rolled backX getSingleResult()
getSingleResult in interface QueryNoResultException - if there is no result
NonUniqueResultException - if more than one result
java.lang.IllegalStateException - if called for a Java
Persistence query language UPDATE or DELETE statement
QueryTimeoutException - if the query execution exceeds
the query timeout value set
TransactionRequiredException - if a lock mode has
been set and there is no transaction
PessimisticLockException - if pessimistic locking
fails and the transaction is rolled back
LockTimeoutException - if pessimistic locking
fails and only the statement is rolled backTypedQuery<X> setMaxResults(int maxResult)
setMaxResults in interface QuerymaxResult -
java.lang.IllegalArgumentException - if argument is negativeTypedQuery<X> setFirstResult(int startPosition)
setFirstResult in interface Querystart - position of the first result, numbered from 0
java.lang.IllegalArgumentException - if argument is negative
TypedQuery<X> setHint(java.lang.String hintName,
java.lang.Object value)
setHint in interface QueryhintName - value -
java.lang.IllegalArgumentException - if the second argument is not
valid for the implementation
<T> TypedQuery<X> setParameter(Parameter<T> param,
T value)
setParameter in interface Queryparam - parameter to be setvalue - parameter value
java.lang.IllegalArgumentException - if parameter
does not correspond to a parameter of the
queryTypedQuery<X> setFlushMode(FlushModeType flushMode)
setFlushMode in interface QueryflushMode - TypedQuery<X> setLockMode(LockModeType lockMode)
setLockMode in interface QuerylockMode -
java.lang.IllegalStateException - if the query is found not to be
a Java Persistence query language SELECT query
or a Criteria API query
|
EclipseLink 2.0.0_ 2.0.0.v20090626-r4569 API Reference | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||