程序包 org.hibernate
类 ObjectNotFoundException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.persistence.PersistenceException
-
- org.hibernate.HibernateException
-
- org.hibernate.UnresolvableObjectException
-
- org.hibernate.ObjectNotFoundException
-
- 所有已实现的接口:
Serializable
public class ObjectNotFoundException extends UnresolvableObjectException
Thrown when Session.load() fails to select a row with the given primary key (identifier value). This exception might not be thrown when load() is called, even if there was no row on the database, because load() returns a proxy if possible. Applications should use Session.get() to test if a row exists in the database.
Like all Hibernate exceptions, this exception is considered unrecoverable.- 作者:
- Gavin King
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 ObjectNotFoundException(Serializable identifier, String entityName)Constructs a ObjectNotFoundException using the given information.
-
方法概要
-
从类继承的方法 org.hibernate.UnresolvableObjectException
getEntityName, getIdentifier, getMessage, throwIfNull
-
-
-
-
构造器详细资料
-
ObjectNotFoundException
public ObjectNotFoundException(Serializable identifier, String entityName)
Constructs a ObjectNotFoundException using the given information.- 参数:
identifier- The identifier of the entityentityName- The name of the entity
-
-