Class PropertyReferenceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.data.core.PropertyResolutionException
org.springframework.data.core.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<? extends PropertyPath> alreadyResolvedPath) Creates a newPropertyReferenceException. -
Method Summary
Modifier and TypeMethodDescription@Nullable PropertyPathReturns 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 NestedRuntimeException
contains, getMostSpecificCause, getRootCauseMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PropertyReferenceException
public PropertyReferenceException(String propertyName, TypeInformation<?> type, List<? extends PropertyPath> alreadyResolvedPath) 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.alreadyResolvedPath- 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:
-