public class JpaUtils extends Object
| Constructor and Description |
|---|
JpaUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getSingleResultOrNull(javax.persistence.Query query)
Tries to get a single result from a JPA query, similar to Hibernate's uniqueResult.
|
public static <T> T getSingleResultOrNull(javax.persistence.Query query)
T - the type of the query resultquery - the JPA query to executejavax.persistence.NonUniqueResultException - if more than one result is foundCopyright © 2024 OpenMRS Inc.. All rights reserved.