Top Description Fields Constructors Methods
org.hibernate

public Class NonUniqueObjectException

extends HibernateException
Class Inheritance
Imports
java.io.Serializable, org.hibernate.pretty.MessageHelper

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.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final String
private final Serializable

Constructor Summary

AccessConstructor and Description
public
NonUniqueObjectException(String
A message explaining the exception condition
message
,
Serializable
The identifier of the entity
entityId
,
String
The name of the entity
entityName
)

Constructs a NonUniqueObjectException using the given information.

public
NonUniqueObjectException(Serializable
The identifier of the entity
entityId
,
String
The name of the entity
entityName
)

Constructs a NonUniqueObjectException using the given information, using a standard message.

Method Summary

Modifier and TypeMethod and Description
public String
public Serializable
public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Field Detail

entityNameback to summary
private final String entityName
identifierback to summary
private final Serializable identifier

Constructor Detail

NonUniqueObjectExceptionback to summary
public NonUniqueObjectException(String message, Serializable entityId, String entityName)

Constructs a NonUniqueObjectException using the given information.

Parameters
message:String

A message explaining the exception condition

entityId:Serializable

The identifier of the entity

entityName:String

The name of the entity

NonUniqueObjectExceptionback to summary
public NonUniqueObjectException(Serializable entityId, String entityName)

Constructs a NonUniqueObjectException using the given information, using a standard message.

Parameters
entityId:Serializable

The identifier of the entity

entityName:String

The name of the entity

Method Detail

getEntityNameback to summary
public String getEntityName()
getIdentifierback to summary
public Serializable getIdentifier()
getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

Annotations
@Override