Class ValuesHandler

  • All Implemented Interfaces:
    Handler

    public class ValuesHandler
    extends java.lang.Object
    implements Handler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAll​(ValuesHandler handler)
      Add the ValuesHandler values to this values Handler.
      void addValueRow​(java.util.Collection<Node> values)
      Add the values for the variables.
      void addValueVar​(Var var, java.util.Collection<Node> nodes)
      Add a variable to the value statement.
      ElementData asElement()  
      void build()
      Called by the build process for this handler to perform any adjustments to the query before the build completes.
      void clear()  
      java.util.Map<Var,​java.util.List<Node>> getValuesMap()  
      java.util.List<Var> getValuesVars()  
      boolean isEmpty()  
      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

      • ValuesHandler

        public ValuesHandler()
        Constructor.
      • ValuesHandler

        public ValuesHandler​(Query query)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
      • 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
      • addValueVar

        public void addValueVar​(Var var,
                                java.util.Collection<Node> nodes)
        Add a variable to the value statement. A variable may only be added once. Attempting to add the same variable multiple times will be silently ignored.
        Parameters:
        var - The variable to add.
      • addValueRow

        public void addValueRow​(java.util.Collection<Node> values)
        Add the values for the variables. There must be one value for each value var.
        Parameters:
        values - the collection of values to add.
      • addAll

        public void addAll​(ValuesHandler handler)
        Add the ValuesHandler values to this values Handler.
        Parameters:
        handler - the handler that has the values to add.
      • clear

        public void clear()
      • getValuesVars

        public java.util.List<Var> getValuesVars()
      • getValuesMap

        public java.util.Map<Var,​java.util.List<Node>> getValuesMap()