Interface AttributePath<X,B,Y>
- Type Parameters:
X
- The type of the entity view that is the base of the pathB
- The result base type of attribute path to resolve againstY
- The result type of attribute path
- All Known Implementing Classes:
AttributePathWrapper
public interface AttributePath<X,B,Y>
A chain of attribute de-references.
- Since:
- 1.5.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and Type Method Description <C, E> AttributePath<X,C,E>
get(AttributePath<B,C,E> attributePath)
Returns a new attribute path that additionally de-references the given path.<C extends Collection<E>, E>
AttributePath<X,E,C>get(MethodMultiListAttribute<B,E,C> attribute)
Returns a new attribute path that additionally de-references the given multi-list attribute.<C extends Collection<E>, E>
AttributePath<X,E,C>get(MethodMultiMapAttribute<B,?,E,C> attribute)
Returns a new attribute path that additionally de-references the given multi-map attribute.<E> AttributePath<X,E,E>
get(MethodPluralAttribute<B,?,E> attribute)
Returns a new attribute path that additionally de-references the given attribute.<E> AttributePath<X,E,E>
get(MethodSingularAttribute<B,E> attribute)
Returns a new attribute path that additionally de-references the given attribute.<E> AttributePath<X,E,E>
get(String attributePath)
Returns a new attribute path that additionally de-references the given path.List<String>
getAttributeNames()
Returns the de-referenced attribute names in order.List<MethodAttribute<?,?>>
getAttributes()
Returns the de-referenced attributes in order.<E, C extends Collection<E>>
AttributePath<X,E,C>getMulti(String attributePath)
Returns a new attribute path that additionally de-references the given path.String
getPath()
Returns the path as dot separated string.MethodAttribute<?,Y>
resolve(ManagedViewType<X> baseType)
Resolves this attribute path on the given base type and returns the last attribute.List<MethodAttribute<?,?>>
resolveAll(ManagedViewType<X> baseType)
Resolves this attribute path on the given base type and returns all attributes in order.
-
Method Details
-
getPath
String getPath()Returns the path as dot separated string.- Returns:
- The path
-
getAttributeNames
Returns the de-referenced attribute names in order.- Returns:
- The de-referenced attribute names
-
getAttributes
List<MethodAttribute<?,?>> getAttributes()Returns the de-referenced attributes in order.- Returns:
- The de-referenced attributes
- Throws:
UnsupportedOperationException
- When this is a string based path
-
get
Returns a new attribute path that additionally de-references the given path.- Type Parameters:
E
- The element type- Parameters:
attributePath
- The path to additionally de-reference- Returns:
- The new attribute path
-
getMulti
Returns a new attribute path that additionally de-references the given path.- Type Parameters:
E
- The element typeC
- The element base type of attribute path to resolve against- Parameters:
attributePath
- The path to additionally de-reference- Returns:
- The new attribute path
-
get
Returns a new attribute path that additionally de-references the given attribute.- Type Parameters:
E
- The element type- Parameters:
attribute
- The attribute to additionally de-reference- Returns:
- The new attribute path
-
get
Returns a new attribute path that additionally de-references the given attribute.- Type Parameters:
E
- The element type- Parameters:
attribute
- The attribute to additionally de-reference- Returns:
- The new attribute path
-
get
<C extends Collection<E>, E> AttributePath<X,E,C> get(MethodMultiListAttribute<B,E,C> attribute)Returns a new attribute path that additionally de-references the given multi-list attribute.- Type Parameters:
C
- The element type to resolve againstE
- The element type- Parameters:
attribute
- The attribute to additionally de-reference- Returns:
- The new attribute path
-
get
<C extends Collection<E>, E> AttributePath<X,E,C> get(MethodMultiMapAttribute<B,?,E,C> attribute)Returns a new attribute path that additionally de-references the given multi-map attribute.- Type Parameters:
C
- The element type to resolve againstE
- The element type- Parameters:
attribute
- The attribute to additionally de-reference- Returns:
- The new attribute path
-
get
Returns a new attribute path that additionally de-references the given path.- Type Parameters:
C
- The element type to resolve againstE
- The element type- Parameters:
attributePath
- The path to additionally de-reference- Returns:
- The new attribute path
-
resolve
Resolves this attribute path on the given base type and returns the last attribute.- Parameters:
baseType
- The base type- Returns:
- The last attribute
-
resolveAll
Resolves this attribute path on the given base type and returns all attributes in order.- Parameters:
baseType
- The base type- Returns:
- The attributes in order
-