Package org.hibernate
Class WrongClassException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.persistence.PersistenceException
-
- org.hibernate.HibernateException
-
- org.hibernate.WrongClassException
-
- All Implemented Interfaces:
java.io.Serializable
public class WrongClassException extends HibernateException
Thrown when loading an entity (by identifier) results in a value that cannot be treated as the subclass type requested by the caller.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WrongClassException(java.lang.String message, java.io.Serializable identifier, java.lang.String entityName)
Constructs a WrongClassException using the supplied information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getEntityName()
java.io.Serializable
getIdentifier()
-
-
-
Constructor Detail
-
WrongClassException
public WrongClassException(java.lang.String message, java.io.Serializable identifier, java.lang.String entityName)
Constructs a WrongClassException using the supplied information.- Parameters:
message
- A message explaining the exception conditionidentifier
- The identifier of the entityentityName
- The entity-type requested
-
-