Package org.hibernate

Class NonUniqueResultException

  • All Implemented Interfaces:
    java.io.Serializable

    public class NonUniqueResultException
    extends HibernateException
    Thrown when the application calls Query.uniqueResult() and the query returned more than one result. Unlike all other Hibernate exceptions, this one is recoverable!
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      NonUniqueResultException​(int resultCount)
      Constructs a NonUniqueResultException.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NonUniqueResultException

        public NonUniqueResultException​(int resultCount)
        Constructs a NonUniqueResultException.
        Parameters:
        resultCount - The number of actual results.