FileDocCategorySizeDatePackage
WrongClassException.javaAPI DocHibernate 3.2.5986Sat Feb 12 00:19:50 GMT 2005org.hibernate

WrongClassException

public class WrongClassException extends HibernateException
Thrown when Session.load() selects a row with the given primary key (identifier value) but the row's discriminator value specifies a subclass that is not assignable to the class requested by the user.
author
Gavin King

Fields Summary
private final Serializable
identifier
private final String
entityName
Constructors Summary
public WrongClassException(String msg, Serializable identifier, String clazz)

		super(msg);
		this.identifier = identifier;
		this.entityName = clazz;
	
Methods Summary
public java.lang.StringgetEntityName()

		return entityName;
	
public java.io.SerializablegetIdentifier()

		return identifier;
	
public java.lang.StringgetMessage()

		return "Object with id: " +
			identifier +
			" was not of the specified subclass: " +
			entityName +
			" (" + super.getMessage() + ")" ;