Package org.hibernate
Class WrongClassException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.persistence.PersistenceException
org.hibernate.HibernateException
org.hibernate.WrongClassException
- All Implemented Interfaces:
Serializable
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:
-
Constructor Summary
ConstructorDescriptionWrongClassException
(String message, Object identifier, String entityName) Constructs aWrongClassException
using the supplied information.WrongClassException
(String resolvedEntityName, Object identifier, String expectedEntityName, Object discriminatorValue) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WrongClassException
Constructs aWrongClassException
using the supplied information.- Parameters:
message
- A message explaining the exception conditionidentifier
- The identifier of the entityentityName
- The entity-type requested
-
WrongClassException
-
-
Method Details
-
getEntityName
-
getIdentifier
-