com.ansys.ingress.client.api.search

## Class Query

- java.lang.Object
- - com.ansys.ingress.client.api.search.Query

-     public class Query
      extends java.lang.Object

  Query represents a complex query that is performed in an EKM repository.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Query()` Creates a new instance of Query.
    `Query(java.lang.String objectType)` Creates a new instance of Query.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `QueryRow` | `createQueryRow(java.lang.String attribute, Condition condition, boolean value)` Creates a query row for a query.
    `QueryRow` | `createQueryRow(java.lang.String attribute, Condition condition, java.util.Calendar value)` Creates a query row for a query.
    `QueryRow` | `createQueryRow(java.lang.String attribute, Condition condition, double value)` Creates a query row for a query.
    `QueryRow` | `createQueryRow(java.lang.String attribute, Condition condition, java.util.List<java.lang.String> value)` Creates a query row for a query.
    `QueryRow` | `createQueryRow(java.lang.String attribute, Condition condition, long value)` Creates a query row for a query.
    `QueryRow` | `createQueryRow(java.lang.String attribute, Condition condition, java.lang.String value)` Creates a query row for a query.
    `QueryOperation` | `getOp()` Gets the query's operation object.
    `java.lang.String` | `getPath()` Gets the path being searched.
    `java.lang.String` | `getType()` Gets the type of this query.
    `java.lang.String` | `serialize()` Serializes this query into a string.
    `void` | `setOp(QueryOperation op)` Sets the query's operation.
    `void` | `setPath(java.lang.String path)` Sets the path that this query will search.

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

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

- - ### Constructor Detail

    - #### Query

          public Query()

      Creates a new instance of Query.

    - #### Query

          public Query(java.lang.String objectType)

      Creates a new instance of Query.
      Parameters:
        `objectType` - the type of objects to search

  - ### Method Detail

    - #### createQueryRow

          public QueryRow createQueryRow(java.lang.String attribute,
                                         Condition condition,
                                         boolean value)

      Creates a query row for a query.
      Parameters:
        `attribute` - the name of the property to search
        `condition` - the condition (e.g. ==, !=)
        `value` - the value to test against
      Returns:
        Returns the row for the query.

    - #### createQueryRow

          public QueryRow createQueryRow(java.lang.String attribute,
                                         Condition condition,
                                         java.util.Calendar value)

      Creates a query row for a query.
      Parameters:
        `attribute` - the name of the property to search
        `condition` - the condition (e.g. ==, !=)
        `value` - the value to test against
      Returns:
        Returns the row for the query.

    - #### createQueryRow

          public QueryRow createQueryRow(java.lang.String attribute,
                                         Condition condition,
                                         double value)

      Creates a query row for a query.
      Parameters:
        `attribute` - the name of the property to search
        `condition` - the condition (e.g. ==, !=)
        `value` - the value to test against
      Returns:
        Returns the row for the query.

    - #### createQueryRow

          public QueryRow createQueryRow(java.lang.String attribute,
                                         Condition condition,
                                         long value)

      Creates a query row for a query.
      Parameters:
        `attribute` - the name of the property to search
        `condition` - the condition (e.g. ==, !=)
        `value` - the value to test against
      Returns:
        Returns the row for the query.

    - #### createQueryRow

          public QueryRow createQueryRow(java.lang.String attribute,
                                         Condition condition,
                                         java.lang.String value)

      Creates a query row for a query.
      Parameters:
        `attribute` - the name of the property to search
        `condition` - the condition (e.g. ==, !=)
        `value` - the value to test against
      Returns:
        Returns the row for the query.

    - #### createQueryRow

          public QueryRow createQueryRow(java.lang.String attribute,
                                         Condition condition,
                                         java.util.List<java.lang.String> value)

      Creates a query row for a query.
      Parameters:
        `attribute` - the name of the property to search
        `condition` - the condition (e.g. ==, !=)
        `value` - the value to test against
      Returns:
        Returns the row for the query.

    - #### getOp

          public QueryOperation getOp()

      Gets the query's operation object.
      Returns:
        the op

    - #### getPath

          public java.lang.String getPath()

      Gets the path being searched. If this is null, the query is searching Shared Data and My Data.
      Returns:
        the path

    - #### getType

          public java.lang.String getType()

      Gets the type of this query.
      Returns:
        the type

    - #### serialize

          public java.lang.String serialize()
                                     throws com.ansys.ingress.commons.serialization.SerializationException

      Serializes this query into a string.
      Returns:
        Returns the serialized query.
      Throws:
        `com.ansys.ingress.commons.serialization.SerializationException` - if the query could not be serialized.

    - #### setOp

          public void setOp(QueryOperation op)

      Sets the query's operation.
      Parameters:
        `op` - the op to set

    - #### setPath

          public void setPath(java.lang.String path)

      Sets the path that this query will search. If not set, the query will search Shared Data and the user's My Data folders.
      Parameters:
        `path` - the path to set