Class MultipleEntitiesFoundException

All Implemented Interfaces:
Serializable

public class MultipleEntitiesFoundException extends DatabaseException
Exception used when one entity was expected but many were found.

The default message is put together when read, in the language of the reader, see DatabaseException.getMessage() and message(Locale).

See Also:
  • Constructor Details

    • MultipleEntitiesFoundException

      public MultipleEntitiesFoundException()
      Instantiates a new MultipleEntitiesFoundException with a default message
    • MultipleEntitiesFoundException

      public MultipleEntitiesFoundException(String message)
      Instantiates a new MultipleEntitiesFoundException
      Parameters:
      message - the exception message
  • Method Details

    • message

      public @Nullable String message(Locale locale)
      Description copied from class: DatabaseException
      Returns the message in the given locale, for an exception based on an error type, otherwise the message this exception was constructed with, which is not affected by the locale. Useful where the default locale is not the one of the reader, a web server serving users of different languages for example.
      Overrides:
      message in class DatabaseException
      Parameters:
      locale - the locale
      Returns:
      the exception message in the given locale