|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistentPropertyPath<T extends PersistentProperty<T>>
Abstraction of a path of PersistentProperty
s.
Method Summary | |
---|---|
T |
getBaseProperty()
Returns the first property in the PersistentPropertyPath . |
PersistentPropertyPath<T> |
getExtensionForBaseOf(PersistentPropertyPath<T> base)
Returns the sub-path of the current one as if it was based on the given base path. |
T |
getLeafProperty()
Returns the last property in the PersistentPropertyPath . |
int |
getLength()
Returns the length of the PersistentPropertyPath . |
PersistentPropertyPath<T> |
getParentPath()
Returns the parent path of the current PersistentPropertyPath , i.e. the path without the leaf property. |
boolean |
isBasePathOf(PersistentPropertyPath<T> 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 T,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 T,String> converter)
Returns a String path with the given delimiter using the given Converter for
PersistentProperty to String conversion. |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
String toDotPath()
PersistentProperty.getName()
.
String toDotPath(Converter<? super T,String> converter)
Converter
to translate individual
PersistentProperty
s to path segments.
converter
-
String toPath(String delimiter)
String
path with the given delimiter based on the PersistentProperty.getName()
.
delimiter
- will default to .
if null is given.
String toPath(String delimiter, Converter<? super T,String> converter)
String
path with the given delimiter using the given Converter
for
PersistentProperty
to String conversion.
delimiter
- will default to .
if null is given.converter
- will default to use PersistentProperty.getName()
.
T getLeafProperty()
PersistentPropertyPath
. So for foo.bar
it will return the
PersistentProperty
for bar
. For a simple foo
it returns PersistentProperty
for
foo
.
T 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<T> 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
-
PersistentPropertyPath<T> getExtensionForBaseOf(PersistentPropertyPath<T> 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
-
PersistentPropertyPath<T> 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
.
|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |