Package org.hibernate

Class PropertyValueException

  • All Implemented Interfaces:
    java.io.Serializable

    public class PropertyValueException
    extends HibernateException
    Thrown when the (illegal) value of a property can not be persisted. There are two main causes:
    • a property declared not-null="true" is null
    • an association references an unsaved transient instance
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyValueException​(java.lang.String message, java.lang.String entityName, java.lang.String propertyName)
      Constructs a PropertyValueException using the specified information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getEntityName()  
      java.lang.String getMessage()  
      java.lang.String getPropertyName()  
      • 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

      • PropertyValueException

        public PropertyValueException​(java.lang.String message,
                                      java.lang.String entityName,
                                      java.lang.String propertyName)
        Constructs a PropertyValueException using the specified information.
        Parameters:
        message - A message explaining the exception condition
        entityName - The name of the entity, containing the property
        propertyName - The name of the property being accessed.
    • Method Detail

      • getEntityName

        public java.lang.String getEntityName()
      • getPropertyName

        public java.lang.String getPropertyName()
      • getMessage

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