Class QueryBuilderSummaryHelper


  • public final class QueryBuilderSummaryHelper
    extends java.lang.Object
    Methods to generate summary information for a PathQuery for use in display of QueryBuilder summary section.
    Author:
    Richard Smith
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.util.List<java.lang.String> findForcedInnerJoins​(PathQuery pathQuery)
      Get a list of paths that should be forced to inner join.
      protected static java.util.List<java.lang.String> findLockedPaths​(PathQuery pathQuery)
      Get a list of paths that should not be removed from the query by the user.
      protected static java.util.List<java.lang.String> findParentPaths​(java.lang.String pathString, PathQuery pathQuery)
      Returns a List of paths, being the given path and all its parents.
      static java.util.List<SummaryPath> getDisplaySummary​(PathQuery query)
      Create summary information of the paths currently in a query and their constraints for display in the QueryBuilder summary section.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDisplaySummary

        public static java.util.List<SummaryPath> getDisplaySummary​(PathQuery query)
                                                             throws PathException
        Create summary information of the paths currently in a query and their constraints for display in the QueryBuilder summary section. The list of SummaryPath objects collect information for simple display in the JSP.
        Parameters:
        query - the query to create summary information from
        Returns:
        a list if summary information about paths on the query
        Throws:
        PathException - if the PathQuery is invalid
      • findLockedPaths

        protected static java.util.List<java.lang.String> findLockedPaths​(PathQuery pathQuery)
                                                                   throws PathException
        Get a list of paths that should not be removed from the query by the user. This is usually because they are involved in a loop query constraint.
        Parameters:
        pathQuery - the PathQuery to process
        Returns:
        list of paths (as Strings) that cannot be removed by the user
        Throws:
        PathException - if something goes wrong
      • findParentPaths

        protected static java.util.List<java.lang.String> findParentPaths​(java.lang.String pathString,
                                                                          PathQuery pathQuery)
                                                                   throws PathException
        Returns a List of paths, being the given path and all its parents.
        Parameters:
        pathString - a path String
        pathQuery - a PathQuery object to use to create a Path object
        Returns:
        a List of path Strings
        Throws:
        PathException - if something goes wrong
      • findForcedInnerJoins

        protected static java.util.List<java.lang.String> findForcedInnerJoins​(PathQuery pathQuery)
                                                                        throws PathException
        Get a list of paths that should be forced to inner join. This is usually because they are involved in a loop query constraint.
        Parameters:
        pathQuery - the PathQuery containing the paths
        Returns:
        a list of paths (as Strings) that must be inner joins
        Throws:
        PathException - if something goes wrong
        java.lang.IllegalArgumentException - if a path that should be an inner join is not