public class ObjectNotFoundException extends UnresolvableObjectException
Thrown when <tt>Session.load()</tt> fails to select a row with the given primary key (identifier value). This exception might not be thrown when <tt>load()</tt> is called, even if there was no row on the database, because <tt>load()</tt> returns a proxy if possible. Applications should use <tt>Session.get()</tt> to test if a row exists in the database.<br> <br> Like all Hibernate exceptions, this exception is considered unrecoverable.
Constructor and Description |
---|
ObjectNotFoundException(Serializable identifier,
String entityName)
Constructs a ObjectNotFoundException using the given information.
|
getEntityName, getIdentifier, getMessage, throwIfNull
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ObjectNotFoundException(Serializable identifier, String entityName)
Constructs a ObjectNotFoundException using the given information.
identifier
- The identifier of the entityentityName
- The name of the entityCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.