Package org.springframework.data.mapping
Interface PersistentPropertyPath<P extends PersistentProperty<P>>
- All Superinterfaces:
Iterable<P>,Streamable<P>,Supplier<Stream<P>>
Abstraction of a path of
PersistentPropertys.- Author:
- Oliver Gierke, Johannes Englmeier
-
Method Summary
Modifier and TypeMethodDescriptionReturns the first property in thePersistentPropertyPath.Returns the sub-path of the current one as if it was based on the given base path.Returns the last property in thePersistentPropertyPath.intReturns the length of thePersistentPropertyPath.Returns the parent path of the currentPersistentPropertyPath, i.e. the path without the leaf property.default PbooleanisBasePathOf(PersistentPropertyPath<P> path) Returns whether the givenPersistentPropertyPathis a base path of the current one.Returns the dot based path notation usingPersistentProperty.getName().Returns the dot based path notation using the givenConverterto translate individualPersistentPropertys to path segments.Returns aStringpath with the given delimiter based on thePersistentProperty.getName().Returns aStringpath with the given delimiter using the givenConverterforPersistentPropertyto String conversion.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
toDotPath
Returns the dot based path notation usingPersistentProperty.getName().- Returns:
-
toDotPath
Returns the dot based path notation using the givenConverterto translate individualPersistentPropertys to path segments.- Parameters:
converter- must not be null.- Returns:
-
toPath
Returns aStringpath with the given delimiter based on thePersistentProperty.getName().- Parameters:
delimiter- must not be null.- Returns:
-
toPath
Returns aStringpath with the given delimiter using the givenConverterforPersistentPropertyto String conversion.- Parameters:
delimiter- must not be null.converter- must not be null.- Returns:
-
getLeafProperty
Returns the last property in thePersistentPropertyPath. So forfoo.barit will return thePersistentPropertyforbar. For a simplefooit returnsPersistentPropertyforfoo.- Returns:
-
getRequiredLeafProperty
-
getBaseProperty
Returns the first property in thePersistentPropertyPath. So forfoo.barit will return thePersistentPropertyforfoo. For a simplefooit returnsPersistentPropertyforfoo.- Returns:
-
isBasePathOf
Returns whether the givenPersistentPropertyPathis a base path of the current one. This means that the currentPersistentPropertyPathis basically an extension of the given one.- Parameters:
path- must not be null.- Returns:
-
getExtensionForBaseOf
Returns the sub-path of the current one as if it was based on the given base path. So for a current pathfoo.barand a given basefooit would returnbar. If the given path is not a base of the the current one the currentPersistentPropertyPathwill be returned as is.- Parameters:
base- must not be null.- Returns:
-
getParentPath
PersistentPropertyPath<P> getParentPath()Returns the parent path of the currentPersistentPropertyPath, i.e. the path without the leaf property. This happens up to the base property. So for a direct property reference calling this method will result in returning the property.- Returns:
-
getLength
int getLength()Returns the length of thePersistentPropertyPath.- Returns:
-