Jakarta Persistence (JPA) Method
Object getSingleResultOrNull()
Retrieve a single result from the next result set. The provider will call
execute on the query if needed. A REF_CURSOR result set, if any, is retrieved in the order the REF_CURSOR parameter was registered with the query.- Returns:
- the result or null if the next item is not a result set or if there is no result in the next result set.
- Throws:
- if more than one result.NonUniqueResultException- if the query execution exceeds the query timeout value set and the transaction is rolled back.PersistenceException- if the query execution exceeds the query timeout value set and only the statement is rolled back.QueryTimeoutException
- Since:
- Jakarta Persistence (JPA) 1.0