Package org.hibernate

Class 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()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 condition
        identifier - The identifier of the entity
        entityName - The entity-type requested
    • Method Detail

      • getEntityName

        public java.lang.String getEntityName()
      • getIdentifier

        public java.io.Serializable getIdentifier()