Package com.sas.lsaf.query

## Class Query

- java.lang.Object
- - com.sas.lsaf.query.Query

- All Implemented Interfaces:
    `java.io.Serializable`
  Direct Known Subclasses:
    `AuditEntryQuery`, `MembershipQuery`, `PermissionsQuery`, `RecycleBinItemQuery`, `RepositoryItemQuery`

      public abstract class Query
      extends java.lang.Object
      implements java.io.Serializable

  This class represents a simplified API to generate criteria to search for items. This is a convenient approach for functionality such as "search" user interfaces, in which ad-hoc queries are built and constrained interactively.
  Since:
    2.3
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Query()` | The default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Query` | `constrain​(Constraint c)` | Sets the constraint to use when executing the query.
    `java.util.List<Column>` | `getColumns()` | Gets the columns to include in the query output.
    `Constraint` | `getConstraint()` | Gets the constraint to use when executing the query.
    `java.util.List<Order>` | `getOrder()` | Gets the order to use in the query output.
    `Query` | `includeColumnNames​(boolean includeColumnNames)` | Sets whether to include column names in the query output.
    `boolean` | `isIncludeColumnNames()` | Indicates whether to include column names in the query output.
    `Query` | `order​(Column... columns)` | Sets the order for the specified columns to order, according to the default sort order, which is descending and case-sensitive.
    `Query` | `order​(Order... orders)` | Sets the order to use in the query output.
    `Query` | `select​(Column... columns)` | Sets the columns to include in the query output.
    `Query` | `select​(java.util.List<Column> columns)` | Sets the list of columns to include in the query output.
    `void` | `setColumns​(java.util.List<Column> columns)` | Sets the columns to include in the query output.
    `void` | `setConstraint​(Constraint constraint)` | Sets the constraint to use when executing the query.
    `void` | `setIncludeColumnNames​(boolean includeColumnNames)` | Sets whether to include column names in the query output.
    `void` | `setOrder​(java.util.List<Order> order)` | Sets the order to use in the query output.
    `java.lang.String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### Query

          public Query()

      The default constructor.

  - ### Method Detail

    - #### getColumns

          public java.util.List<Column> getColumns()

      Gets the columns to include in the query output.
      Returns:
        The columns to include in the query output.

    - #### setColumns

          public void setColumns​(java.util.List<Column> columns)

      Sets the columns to include in the query output.
      Parameters:
        `columns` - The columns to include in the query output.

    - #### getConstraint

          public Constraint getConstraint()

      Gets the constraint to use when executing the query.
      Returns:
        The constraint to use when executing the query.

    - #### setConstraint

          public void setConstraint​(Constraint constraint)

      Sets the constraint to use when executing the query.
      Parameters:
        `constraint` - The constraint to use when executing the query.

    - #### getOrder

          public java.util.List<Order> getOrder()

      Gets the order to use in the query output.
      Returns:
        The order to use in the query output.

    - #### setOrder

          public void setOrder​(java.util.List<Order> order)

      Sets the order to use in the query output.
      Parameters:
        `order` - The order to use in the query output.

    - #### isIncludeColumnNames

          public boolean isIncludeColumnNames()

      Indicates whether to include column names in the query output. The default is true.
      Returns:
        Whether to include column names in the query output.

    - #### setIncludeColumnNames

          public void setIncludeColumnNames​(boolean includeColumnNames)

      Sets whether to include column names in the query output. The default is true.
      Parameters:
        `includeColumnNames` - Indicates whether to include column names in the query output.

    - #### select

          public Query select​(Column... columns)

      Sets the columns to include in the query output.
      Returns:
        The updated Query object.

    - #### select

          public Query select​(java.util.List<Column> columns)

      Sets the list of columns to include in the query output.
      Returns:
        The updated Query object.

    - #### constrain

          public Query constrain​(Constraint c)

      Sets the constraint to use when executing the query.
      Returns:
        The updated Query object.

    - #### order

          public final Query order​(Column... columns)

      Sets the order for the specified columns to order, according to the default sort order, which is descending and case-sensitive.
      Returns:
        The updated Query object.

    - #### order

          public final Query order​(Order... orders)

      Sets the order to use in the query output.
      Returns:
        The updated Query object.

    - #### includeColumnNames

          public final Query includeColumnNames​(boolean includeColumnNames)

      Sets whether to include column names in the query output. The default is true.
      Returns:
        The updated Query object.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`