Class AggregationHandler

  • All Implemented Interfaces:
    Handler

    public class AggregationHandler
    extends java.lang.Object
    implements Handler
    Class to handle manipulation the aggregation variables in the query.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(Expr expr, Var var)
      Add and expression aggregator and variable to the mapping.
      AggregationHandler addAll​(AggregationHandler handler)
      Add all the aggregations from the other handler.
      void build()
      Called by the build process for this handler to perform any adjustments to the query before the build completes.
      Query getQuery()
      Get the query we are executing against.
      void setVars​(java.util.Map<Var,​Node> values)
      Set the values for variables managed by the handler implementation.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AggregationHandler

        public AggregationHandler​(Query query)
        Constructor.
        Parameters:
        query - the query to handle.
    • Method Detail

      • addAll

        public AggregationHandler addAll​(AggregationHandler handler)
        Add all the aggregations from the other handler.
        Parameters:
        handler - The other handler.
        Returns:
        This handler for chaining.
      • getQuery

        public Query getQuery()
        Get the query we are executing against.
        Returns:
        the query.
      • setVars

        public void setVars​(java.util.Map<Var,​Node> values)
        Description copied from interface: Handler
        Set the values for variables managed by the handler implementation. This method is called by the builder to set values handled by this Handler implementation.
        Specified by:
        setVars in interface Handler
        Parameters:
        values - The map of variable to node value.
      • build

        public void build()
        Description copied from interface: Handler
        Called by the build process for this handler to perform any adjustments to the query before the build completes. The adjustments are made after setVars() has been called.
        Specified by:
        build in interface Handler
      • add

        public void add​(Expr expr,
                        Var var)
        Add and expression aggregator and variable to the mapping. if the expr parameter is not an instance of ExprAggregator then no action is taken.
        Parameters:
        expr - The expression to add.
        var - The variable that it is bound to.