1
//$Id: WrongClassException.java 5685 2005-02-12 07:19:50Z steveebersole $
4
import java.io.Serializable;
7
* Thrown when <tt>Session.load()</tt> selects a row with
8
* the given primary key (identifier value) but the row's
9
* discriminator value specifies a subclass that is not
10
* assignable to the class requested by the user.
14
public class WrongClassException extends HibernateException {
16
private final Serializable identifier;
17
private final String entityName;
19
public WrongClassException(String msg, Serializable identifier, String clazz) {
21
this.identifier = identifier;
22
this.entityName = clazz;
24
public Serializable getIdentifier() {
28
public String getMessage() {
29
return "Object with id: " +
31
" was not of the specified subclass: " +
33
" (" + super.getMessage() + ")" ;
36
public String getEntityName() {