Class NonUniqueResultException

All Implemented Interfaces:
Serializable

public class NonUniqueResultException extends PersistenceException
Thrown by the persistence provider when Query.getSingleResult(), TypedQuery.getSingleResult(), Query.getSingleResultOrNull(), or TypedQuery.getSingleResultOrNull() is executed and the query has more than one result.

This exception type is considered recoverable. When this exception type is thrown, the current transaction is not automatically marked for rollback.

Since:
1.0
See Also:
  • Constructor Details

    • NonUniqueResultException

      public NonUniqueResultException()
      Constructs a new NonUniqueResultException exception with null as its detail message.
    • NonUniqueResultException

      public NonUniqueResultException(Exception cause)
      Constructs a new NonUniqueResultException exception with null as its detail message.
    • NonUniqueResultException

      public NonUniqueResultException(String message)
      Constructs a new NonUniqueResultException exception with the specified detail message.
      Parameters:
      message - the detail message.
    • NonUniqueResultException

      public NonUniqueResultException(String message, Exception cause)
      Constructs a new NonUniqueResultException exception with the specified detail message.
      Parameters:
      message - the detail message.