edu.ucsb.nceas.metacat

## Class QueryGroup

- java.lang.Object
- - edu.ucsb.nceas.metacat.QueryGroup

-     public class QueryGroup
      extends java.lang.Object

  a utility class that represents a group of terms in a query

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `INTERSECT`
    `static java.lang.String` | `UNION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryGroup(java.lang.String operator)` construct a new QueryGroup

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addChild(QueryGroup qgroup)` Add a child QueryGroup to this QueryGroup
    `void` | `addChild(QueryTerm qterm)` Add a child QueryTerm to this QueryGroup
    `int` | `getPercentageSymbolCount()`
    `java.lang.String` | `printSQL(boolean useXMLIndex, java.util.List<java.lang.Object> parameterValues)` create a SQL serialization of the query that this instance represents
    `java.lang.String` | `toString()` create a String description of the query that this instance represents.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### UNION

          public static java.lang.String UNION

    - #### INTERSECT

          public static java.lang.String INTERSECT

  - ### Constructor Detail

    - #### QueryGroup

          public QueryGroup(java.lang.String operator)

      construct a new QueryGroup
      Parameters:
        `operator` - the boolean conector used to connect query terms in this query group

  - ### Method Detail

    - #### addChild

          public void addChild(QueryGroup qgroup)

      Add a child QueryGroup to this QueryGroup
      Parameters:
        `qgroup` - the query group to be added to the list of terms

    - #### addChild

          public void addChild(QueryTerm qterm)

      Add a child QueryTerm to this QueryGroup
      Parameters:
        `qterm` - the query term to be added to the list of terms

    - #### getPercentageSymbolCount

          public int getPercentageSymbolCount()

    - #### printSQL

          public java.lang.String printSQL(boolean useXMLIndex,
                                           java.util.List<java.lang.Object> parameterValues)

      create a SQL serialization of the query that this instance represents

    - #### toString

          public java.lang.String toString()

      create a String description of the query that this instance represents. This should become a way to get the XML serialization of the query.
      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2023 Regents of the University of California. All Rights Reserved.