Class JoinPath

java.lang.Object
org.tentackle.wurblet.JoinPath
All Implemented Interfaces:
org.tentackle.common.Path<JoinPath,Join>

public class JoinPath extends Object implements org.tentackle.common.Path<JoinPath,Join>
Path of Joins.
Author:
harald
  • Constructor Details

    • JoinPath

      public JoinPath(List<Join> elements, List<JoinPath> paths)
      Creates a relation path.
      Parameters:
      elements - the relations, null or empty if none
      paths - the continuation paths, null or empty if none
    • JoinPath

      public JoinPath(Join element, List<JoinPath> paths)
      Creates a normalized relation path.
      Parameters:
      element - the relation
      paths - the continuation paths, null or empty if none
  • Method Details

    • getElements

      public List<Join> getElements()
      Specified by:
      getElements in interface org.tentackle.common.Path<JoinPath,Join>
    • getPaths

      public List<JoinPath> getPaths()
      Specified by:
      getPaths in interface org.tentackle.common.Path<JoinPath,Join>
    • isFiltered

      public boolean isFiltered(boolean componentsOnly)
      Returns whether at least one join path contains a filter expression.
      Parameters:
      componentsOnly - true if check component relations only
      Returns:
      true if filtered, false if no filter found
    • findJoin

      public Join findJoin(Entity component) throws org.wurbelizer.wurbel.WurbelException
      Finds the join for a given component.
      Parameters:
      component - the component
      Returns:
      the path if unique, null if no path
      Throws:
      org.wurbelizer.wurbel.WurbelException - if component path is ambiguous
    • findJoin

      public Join findJoin(List<WurbletRelation> wurbletRelations)
      Find the join for given relation path.
      Parameters:
      wurbletRelations - the relation path
      Returns:
      the join if found, else null
    • normalize

      public void normalize()
      Normalizes the join and all subjoins.
      A normalized join contains only a single element.
    • toString

      public String toString()
      Overrides:
      toString in class Object