Class AttributePathWrapper<X,B,Y>

java.lang.Object
com.blazebit.persistence.view.metamodel.AttributePathWrapper<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 Implemented Interfaces:
AttributePath<X,B,Y>

public abstract class AttributePathWrapper<X,B,Y> extends Object implements AttributePath<X,B,Y>
A wrapper for an attribute path.
Since:
1.5.0
Author:
Christian Beikov
  • Constructor Details

    • AttributePathWrapper

      public AttributePathWrapper(AttributePath<X,B,Y> wrapped)
      Creates a new wrapper.
      Parameters:
      wrapped - The wrapped path.
  • Method Details

    • getWrapped

      public AttributePath<X,B,Y> getWrapped()
      Returns the wrapped path.
      Returns:
      the wrapped path
    • getPath

      public String getPath()
      Description copied from interface: AttributePath
      Returns the path as dot separated string.
      Specified by:
      getPath in interface AttributePath<X,B,Y>
      Returns:
      The path
    • getAttributeNames

      public List<String> getAttributeNames()
      Description copied from interface: AttributePath
      Returns the de-referenced attribute names in order.
      Specified by:
      getAttributeNames in interface AttributePath<X,B,Y>
      Returns:
      The de-referenced attribute names
    • getAttributes

      public List<MethodAttribute<?,?>> getAttributes()
      Description copied from interface: AttributePath
      Returns the de-referenced attributes in order.
      Specified by:
      getAttributes in interface AttributePath<X,B,Y>
      Returns:
      The de-referenced attributes
    • get

      public <E> AttributePath<X,E,E> get(String attributePath)
      Description copied from interface: AttributePath
      Returns a new attribute path that additionally de-references the given path.
      Specified by:
      get in interface AttributePath<X,B,Y>
      Type Parameters:
      E - The element type
      Parameters:
      attributePath - The path to additionally de-reference
      Returns:
      The new attribute path
    • getMulti

      public <E, C extends Collection<E>> AttributePath<X,E,C> getMulti(String attributePath)
      Description copied from interface: AttributePath
      Returns a new attribute path that additionally de-references the given path.
      Specified by:
      getMulti in interface AttributePath<X,B,Y>
      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

      public <E> AttributePath<X,E,E> get(MethodSingularAttribute<B,E> attribute)
      Description copied from interface: AttributePath
      Returns a new attribute path that additionally de-references the given attribute.
      Specified by:
      get in interface AttributePath<X,B,Y>
      Type Parameters:
      E - The element type
      Parameters:
      attribute - The attribute to additionally de-reference
      Returns:
      The new attribute path
    • get

      public <E> AttributePath<X,E,E> get(MethodPluralAttribute<B,?,E> attribute)
      Description copied from interface: AttributePath
      Returns a new attribute path that additionally de-references the given attribute.
      Specified by:
      get in interface AttributePath<X,B,Y>
      Type Parameters:
      E - The element type
      Parameters:
      attribute - The attribute to additionally de-reference
      Returns:
      The new attribute path
    • get

      public <C extends Collection<E>, E> AttributePath<X,E,C> get(MethodMultiListAttribute<B,E,C> attribute)
      Description copied from interface: AttributePath
      Returns a new attribute path that additionally de-references the given multi-list attribute.
      Specified by:
      get in interface AttributePath<X,B,Y>
      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

      public <C extends Collection<E>, E> AttributePath<X,E,C> get(MethodMultiMapAttribute<B,?,E,C> attribute)
      Description copied from interface: AttributePath
      Returns a new attribute path that additionally de-references the given multi-map attribute.
      Specified by:
      get in interface AttributePath<X,B,Y>
      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

      public <C, E> AttributePath<X,C,E> get(AttributePath<B,C,E> attributePath)
      Description copied from interface: AttributePath
      Returns a new attribute path that additionally de-references the given path.
      Specified by:
      get in interface AttributePath<X,B,Y>
      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

      public MethodAttribute<?,Y> resolve(ManagedViewType<X> baseType)
      Description copied from interface: AttributePath
      Resolves this attribute path on the given base type and returns the last attribute.
      Specified by:
      resolve in interface AttributePath<X,B,Y>
      Parameters:
      baseType - The base type
      Returns:
      The last attribute
    • resolveAll

      public List<MethodAttribute<?,?>> resolveAll(ManagedViewType<X> baseType)
      Description copied from interface: AttributePath
      Resolves this attribute path on the given base type and returns all attributes in order.
      Specified by:
      resolveAll in interface AttributePath<X,B,Y>
      Parameters:
      baseType - The base type
      Returns:
      The attributes in order