Interface AttributePath<X,​B,​Y>

Type Parameters:
X - The type of the entity view that is the base of the path
B - The result base type of attribute path to resolve against
Y - 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 Details

    • getPath

      String getPath()
      Returns the path as dot separated string.
      Returns:
      The path
    • getAttributeNames

      List<String> 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

      <E> AttributePath<X,​E,​E> get​(String attributePath)
      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

      <E,​ C extends Collection<E>> AttributePath<X,​E,​C> getMulti​(String attributePath)
      Returns a new attribute path that additionally de-references the given path.
      Type Parameters:
      E - The element type
      C - The element base type of attribute path to resolve against
      Parameters:
      attributePath - The path to additionally de-reference
      Returns:
      The new attribute path
    • get

      <E> AttributePath<X,​E,​E> get​(MethodSingularAttribute<B,​E> attribute)
      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

      <E> AttributePath<X,​E,​E> get​(MethodPluralAttribute<B,​?,​E> attribute)
      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 against
      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​(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 against
      E - The element type
      Parameters:
      attribute - The attribute to additionally de-reference
      Returns:
      The new attribute path
    • get

      <C,​ E> AttributePath<X,​C,​E> get​(AttributePath<B,​C,​E> attributePath)
      Returns a new attribute path that additionally de-references the given path.
      Type Parameters:
      C - The element type to resolve against
      E - The element type
      Parameters:
      attributePath - The path to additionally de-reference
      Returns:
      The new attribute path
    • resolve

      MethodAttribute<?,​Y> resolve​(ManagedViewType<X> baseType)
      Resolves this attribute path on the given base type and returns the last attribute.
      Parameters:
      baseType - The base type
      Returns:
      The last attribute
    • resolveAll

      List<MethodAttribute<?,​?>> resolveAll​(ManagedViewType<X> baseType)
      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