public interface PersistentPropertyPath<P extends PersistentProperty<P>> extends Streamable<P>
PersistentProperty
s.Modifier and Type | Method and Description |
---|---|
P |
getBaseProperty()
Returns the first property in the
PersistentPropertyPath . |
PersistentPropertyPath<P> |
getExtensionForBaseOf(PersistentPropertyPath<P> base)
Returns the sub-path of the current one as if it was based on the given base path.
|
P |
getLeafProperty()
Returns the last property in the
PersistentPropertyPath . |
int |
getLength()
Returns the length of the
PersistentPropertyPath . |
PersistentPropertyPath<P> |
getParentPath()
Returns the parent path of the current
PersistentPropertyPath , i.e. the path without the leaf property. |
default P |
getRequiredLeafProperty() |
boolean |
isBasePathOf(PersistentPropertyPath<P> path)
Returns whether the given
PersistentPropertyPath is a base path of the current one. |
String |
toDotPath()
Returns the dot based path notation using
PersistentProperty.getName() . |
String |
toDotPath(Converter<? super P,String> converter)
Returns the dot based path notation using the given
Converter to translate individual
PersistentProperty s to path segments. |
String |
toPath(String delimiter)
Returns a
String path with the given delimiter based on the PersistentProperty.getName() . |
String |
toPath(String delimiter,
Converter<? super P,String> converter)
Returns a
String path with the given delimiter using the given Converter for
PersistentProperty to String conversion. |
and, empty, filter, flatMap, get, isEmpty, map, of, of, of, stream
forEach, iterator, spliterator
@Nullable String toDotPath()
PersistentProperty.getName()
.@Nullable String toDotPath(Converter<? super P,String> converter)
Converter
to translate individual
PersistentProperty
s to path segments.converter
- must not be null.@Nullable String toPath(String delimiter)
String
path with the given delimiter based on the PersistentProperty.getName()
.delimiter
- must not be null.@Nullable String toPath(String delimiter, Converter<? super P,String> converter)
String
path with the given delimiter using the given Converter
for
PersistentProperty
to String conversion.delimiter
- must not be null.converter
- must not be null.@Nullable P getLeafProperty()
PersistentPropertyPath
. So for foo.bar
it will return the
PersistentProperty
for bar
. For a simple foo
it returns PersistentProperty
for
foo
.default P getRequiredLeafProperty()
@Nullable P getBaseProperty()
PersistentPropertyPath
. So for foo.bar
it will return the
PersistentProperty
for foo
. For a simple foo
it returns PersistentProperty
for
foo
.boolean isBasePathOf(PersistentPropertyPath<P> path)
PersistentPropertyPath
is a base path of the current one. This means that the
current PersistentPropertyPath
is basically an extension of the given one.path
- must not be null.PersistentPropertyPath<P> getExtensionForBaseOf(PersistentPropertyPath<P> base)
foo.bar
and a given base foo
it would return bar
. If the given path is not a base of the
the current one the current PersistentPropertyPath
will be returned as is.base
- must not be null.PersistentPropertyPath<P> getParentPath()
PersistentPropertyPath
, 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.int getLength()
PersistentPropertyPath
.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.