Module is.codion.framework.db
Package is.codion.framework.db.exception
Class MultipleEntitiesFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
is.codion.common.db.exception.DatabaseException
is.codion.framework.db.exception.MultipleEntitiesFoundException
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
Fields inherited from class is.codion.common.db.exception.DatabaseException
SQL_STATE_NO_DATA -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new MultipleEntitiesFoundException with a default messageMultipleEntitiesFoundException(String message) Instantiates a new MultipleEntitiesFoundException -
Method Summary
Methods inherited from class is.codion.common.db.exception.DatabaseException
detail, errorCode, errorType, getMessage, setStackTrace, sqlStateMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, toString
-
Constructor Details
-
MultipleEntitiesFoundException
public MultipleEntitiesFoundException()Instantiates a new MultipleEntitiesFoundException with a default message -
MultipleEntitiesFoundException
Instantiates a new MultipleEntitiesFoundException- Parameters:
message- the exception message
-
-
Method Details
-
message
Description copied from class:DatabaseExceptionReturns 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:
messagein classDatabaseException- Parameters:
locale- the locale- Returns:
- the exception message in the given locale
-