Package org.springframework.data.mapping
Class PropertyReferenceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.data.mapping.PropertyReferenceException
- All Implemented Interfaces:
Serializable
Exception being thrown when creating
PropertyPath instances.- Author:
- Oliver Gierke, Christoph Strobl, John Blum
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyReferenceException(String propertyName, TypeInformation<?> type, List<PropertyPath> alreadyResolvedPah) Creates a newPropertyReferenceException. -
Method Summary
Modifier and TypeMethodDescriptionReturns thePropertyPathwhich could be resolved so far.Returns the name of the property not found.getType()Returns the type the property could not be found on.booleanReturns whether the givenPropertyReferenceExceptionhas a deeper resolution depth (i.e. a longer path of already resolved properties) than the current exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PropertyReferenceException
public PropertyReferenceException(String propertyName, TypeInformation<?> type, List<PropertyPath> alreadyResolvedPah) Creates a newPropertyReferenceException.- 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 calculatedPropertyPaths, must not be null.
-
-
Method Details
-
getPropertyName
Returns the name of the property not found.- Returns:
- will not be null or empty.
-
getType
Returns the type the property could not be found on.- Returns:
- will never be null.
-
getMessage
- Overrides:
getMessagein classThrowable
-
getBaseProperty
Returns thePropertyPathwhich could be resolved so far.- Returns:
-
hasDeeperResolutionDepthThan
Returns whether the givenPropertyReferenceExceptionhas a deeper resolution depth (i.e. a longer path of already resolved properties) than the current exception.- Parameters:
exception- must not be null.- Returns:
-