程序包 org.hibernate
类 NonUniqueObjectException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.persistence.PersistenceException
-
- org.hibernate.HibernateException
-
- org.hibernate.NonUniqueObjectException
-
- 所有已实现的接口:
Serializable
public class NonUniqueObjectException extends HibernateException
This exception is thrown when an operation would break session-scoped identity. This occurs if the user tries to associate two different instances of the same Java class with a particular identifier, in the scope of a single Session.- 作者:
- Gavin King
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 NonUniqueObjectException(Serializable entityId, String entityName)Constructs a NonUniqueObjectException using the given information, using a standard message.NonUniqueObjectException(String message, Serializable entityId, String entityName)Constructs a NonUniqueObjectException using the given information.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetEntityName()SerializablegetIdentifier()StringgetMessage()
-
-
-
构造器详细资料
-
NonUniqueObjectException
public NonUniqueObjectException(String message, Serializable entityId, String entityName)
Constructs a NonUniqueObjectException using the given information.- 参数:
message- A message explaining the exception conditionentityId- The identifier of the entityentityName- The name of the entity
-
NonUniqueObjectException
public NonUniqueObjectException(Serializable entityId, String entityName)
Constructs a NonUniqueObjectException using the given information, using a standard message.- 参数:
entityId- The identifier of the entityentityName- The name of the entity
-
-
方法详细资料
-
getEntityName
public String getEntityName()
-
getIdentifier
public Serializable getIdentifier()
-
getMessage
public String getMessage()
- 覆盖:
getMessage在类中Throwable
-
-