Package org.hibernate

Class PropertyAccessException

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    PropertySetterAccessException

    public class PropertyAccessException
    extends HibernateException
    A problem occurred accessing a property of an instance of a persistent class by reflection, or via enhanced entities. There are a number of possible underlying causes, including
    • failure of a security check
    • an exception occurring inside the getter or setter method
    • a nullable database column was mapped to a primitive-type property
    • the Hibernate type was not castable to the property type (or vice-versa)
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyAccessException​(java.lang.Throwable cause, java.lang.String message, boolean wasSetter, java.lang.Class persistentClass, java.lang.String propertyName)
      Constructs a PropertyAccessException using the specified information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage()  
      java.lang.Class getPersistentClass()  
      java.lang.String getPropertyName()  
      protected java.lang.String originalMessage()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, 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

      • PropertyAccessException

        public PropertyAccessException​(java.lang.Throwable cause,
                                       java.lang.String message,
                                       boolean wasSetter,
                                       java.lang.Class persistentClass,
                                       java.lang.String propertyName)
        Constructs a PropertyAccessException using the specified information.
        Parameters:
        cause - The underlying cause
        message - A message explaining the exception condition
        wasSetter - Was the attempting to access the setter the cause of the exception?
        persistentClass - The class which is supposed to contain the property in question
        propertyName - The name of the property.
    • Method Detail

      • getPersistentClass

        public java.lang.Class getPersistentClass()
      • getPropertyName

        public java.lang.String getPropertyName()
      • originalMessage

        protected java.lang.String originalMessage()
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable