Class SummaryPath

  • All Implemented Interfaces:
    java.lang.Comparable<SummaryPath>

    public class SummaryPath
    extends DisplayPath
    implements java.lang.Comparable<SummaryPath>
    Representation of a query path with additional information for display in the QueryBulder summary section. Holds information about constraints applied to the path, if the path is locked and if the path is forced to be an inner join.
    Author:
    Richard Smith
    • Constructor Detail

      • SummaryPath

        public SummaryPath​(Path path,
                           boolean isLocked,
                           boolean isForcedInner)
        Construct a summary path with details of whether the path is locked and/or forced to be an inner join.
        Parameters:
        path - a path from the query to be displayed in the summary
        isLocked - true if the path cannot be removed from the query
        isForcedInner - true if this path must remain an inner join
    • Method Detail

      • addSummaryConstraint

        protected void addSummaryConstraint​(SummaryConstraint con)
        Add a constraint to that applies to this path.
        Parameters:
        con - a constraint that applies to this path
      • getConstraints

        public java.util.List<SummaryConstraint> getConstraints()
        Return summary representations of constraints on this path or an empty list if none exist.
        Returns:
        constraints applied to this path
      • getSubclass

        public java.lang.String getSubclass()
        Returns the name of the subclass on this path, if there is one.
        Returns:
        a String
      • setSubclass

        public void setSubclass​(java.lang.String subclass)
        Sets the subclass on this path.
        Parameters:
        subclass - the new subclass String
      • isLocked

        public boolean isLocked()
        Return true if this path is locked because it is involved in a loop constraint. Locked paths cannot be removed from the query unless the loop constraint is removed. This means the remove path icon should not be displayed.
        Returns:
        true if this path is locked
      • isForcedInnerJoin

        public boolean isForcedInnerJoin()
        Return true if this path is forced to be an inner join because it is involved in a loop constraint. This means the edit join style icon should not be displayed.
        Returns:
        true if this path is forced to be an inner join
      • compareTo

        public int compareTo​(SummaryPath other)
        Specified by:
        compareTo in interface java.lang.Comparable<SummaryPath>