FileDocCategorySizeDatePackage
NonUniqueObjectException.javaAPI DocHibernate 3.2.51195Sat Feb 12 00:19:50 GMT 2005org.hibernate

NonUniqueObjectException

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

Fields Summary
private final Serializable
identifier
private final String
entityName
Constructors Summary
public NonUniqueObjectException(String message, Serializable id, String clazz)

		super(message);
		this.entityName = clazz;
		this.identifier = id;
	
public NonUniqueObjectException(Serializable id, String clazz)

		this("a different object with the same identifier value was already associated with the session", id, clazz);
	
Methods Summary
public java.lang.StringgetEntityName()

		return entityName;
	
public java.io.SerializablegetIdentifier()

		return identifier;
	
public java.lang.StringgetMessage()

		return super.getMessage() + ": " +
			MessageHelper.infoString(entityName, identifier);