Class PropertyReferenceException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.data.mapping.PropertyReferenceException
All Implemented Interfaces:
Serializable

public class PropertyReferenceException extends RuntimeException
Exception being thrown when creating PropertyPath instances.
Author:
Oliver Gierke, Christoph Strobl, John Blum
See Also:
  • Constructor Details

    • PropertyReferenceException

      public PropertyReferenceException(String propertyName, TypeInformation<?> type, List<PropertyPath> alreadyResolvedPah)
      Parameters:
      propertyName - the name of the property not found on the given type, must not be null or empty.
      type - the type the property could not be found on, must not be null.
      alreadyResolvedPah - the previously calculated PropertyPaths, must not be null.
  • Method Details

    • getPropertyName

      public String getPropertyName()
      Returns the name of the property not found.
      Returns:
      will not be null or empty.
    • getType

      public TypeInformation<?> getType()
      Returns the type the property could not be found on.
      Returns:
      will never be null.
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getBaseProperty

      @Nullable public PropertyPath getBaseProperty()
      Returns the PropertyPath which could be resolved so far.
      Returns:
    • hasDeeperResolutionDepthThan

      public boolean hasDeeperResolutionDepthThan(PropertyReferenceException exception)
      Returns whether the given PropertyReferenceException has a deeper resolution depth (i.e. a longer path of already resolved properties) than the current exception.
      Parameters:
      exception - must not be null.
      Returns: