getResultList in JPA/JDO APIs
getResultList() - JPA Query's method
Methodjavax.persistence.Query
List getResultList()
Execute a SELECT query and return the query results
as an untyped List.
- Returns:
- a list of the results
- Throws:
IllegalStateException- if called for a Java Persistence query language UPDATE or DELETE statementQueryTimeoutException- if the query execution exceeds the query timeout value set and only the statement is rolled backTransactionRequiredException- if a lock mode has been set and there is no transactionPessimisticLockException- if pessimistic locking fails and the transaction is rolled backLockTimeoutException- if pessimistic locking fails and only the statement is rolled backPersistenceException- if the query execution exceeds the query timeout value set and the transaction is rolled back
- Since:
- JPA 1.0
getResultList() - JPA TypedQuery's method
Methodjavax.persistence.TypedQuery
List<X> getResultList()
Execute a SELECT query and return the query results
as a typed List.
- Returns:
- a list of the results
- Throws:
IllegalStateException- if called for a Java Persistence query language UPDATE or DELETE statementQueryTimeoutException- if the query execution exceeds the query timeout value set and only the statement is rolled backTransactionRequiredException- if a lock mode has been set and there is no transactionPessimisticLockException- if pessimistic locking fails and the transaction is rolled backLockTimeoutException- if pessimistic locking fails and only the statement is rolled backPersistenceException- if the query execution exceeds the query timeout value set and the transaction is rolled back
- Since:
- JPA 2.0
This documentation page is derived from the JPA 2 open source RI (EclipseLink) and/or the JDO 2.2 API
and is available under the terms of the Eclipse Public License, v. 1.0 and/or the Apache License, v. 2.0.