Class Query

java.lang.Object
com.sas.lsaf.query.Query
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AuditEntryQuery, MembershipQuery, PermissionsQuery, RecycleBinItemQuery, RepositoryItemQuery

public abstract class Query extends Object implements 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:
  • Constructor Details

    • Query

      public Query()
      The default constructor.
  • Method Details

    • getColumns

      public 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(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 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(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(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 String toString()
      Overrides:
      toString in class Object