Class Order

java.lang.Object
com.sas.lsaf.query.Order
All Implemented Interfaces:
Serializable

public class Order extends Object implements Serializable
The class that represents the sorting method of the queried information by a column.
Since:
2.3
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    The default constructor.
    Order(Column column)
    The constructor with the column to sort.
    Order(Column column, boolean ascending)
    The constructor with the column to sort and whether to sort in ascending order.
    Order(Column column, boolean ascending, boolean caseSensitive)
    The constructor with the column to sort, whether to sort in ascending order, and whether the sort is case-sensitive.
  • Method Summary

    Modifier and Type
    Method
    Description
    Sets the sort order as ascending.
    static Order
    ascending(Column column)
    Creates an Order object with the specified column sorted in ascending order.
    static Order
    ascending(Column column, boolean caseSensitive)
    Creates an Order object with the specified column sorted in ascending order and indicates whether it is case-sensitive.
    Sets the sort as case-insensitive.
    Sets the sort as case-sensitive.
    column(Column column)
    Sets the column to sort.
    Sets the sort order as descending.
    static Order
    Creates an Order object with the specified column sorted in descending order.
    static Order
    descending(Column column, boolean caseSensitive)
    Creates an Order object with the specified column sorted in descending order and indicates whether it is case-sensitive.
    Gets the column to sort.
    boolean
    Indicates whether to sort in ascending order.
    boolean
    Indicates whether the sort is case-sensitive.
    boolean
    Indicates whether to sort in descending order.
    static Order
    order(Column column, boolean ascending)
    Creates an Order object with the specified column and indicates whether to sort in ascending order.
    static Order
    order(Column column, boolean ascending, boolean caseSensitive)
    Creates an Order object with the specified column and indicates whether to sort in ascending order and indicates whether it is case-sensitive.
    void
    setAscending(boolean ascending)
    Sets whether to sort in ascending order.
    void
    setCaseSensitive(boolean caseSensitive)
    Sets whether the sort is case-sensitive.
    void
    setColumn(Column column)
    Sets the column to sort.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Order

      public Order()
      The default constructor.
    • Order

      public Order(Column column)
      The constructor with the column to sort. The default order is descending and case-sensitive.
      Parameters:
      column - The column to sort.
    • Order

      public Order(Column column, boolean ascending)
      The constructor with the column to sort and whether to sort in ascending order.
      Parameters:
      column - The column to sort.
      ascending - Indicates whether to sort in ascending order.
    • Order

      public Order(Column column, boolean ascending, boolean caseSensitive)
      The constructor with the column to sort, whether to sort in ascending order, and whether the sort is case-sensitive.
      Parameters:
      column - The column to sort.
      ascending - Indicates whether to sort in ascending order.
      caseSensitive - Indicates whether the sort is case-sensitive.
  • Method Details

    • getColumn

      public Column getColumn()
      Gets the column to sort.
      Returns:
      The column to sort.
    • setColumn

      public void setColumn(Column column)
      Sets the column to sort.
      Parameters:
      column - The column to sort.
    • setAscending

      public void setAscending(boolean ascending)
      Sets whether to sort in ascending order. The default is false.
      Parameters:
      ascending - Indicates whether to sort in ascending order.
    • isDescending

      public boolean isDescending()
      Indicates whether to sort in descending order. The default is true.
      Returns:
      A boolean value that indicates whether to sort in descending order.
    • isAscending

      public boolean isAscending()
      Indicates whether to sort in ascending order. The default is false.
      Returns:
      A boolean value that indicates whether to sort in ascending order.
    • isCaseSensitive

      public boolean isCaseSensitive()
      Indicates whether the sort is case-sensitive. The default is true.
      Returns:
      A boolean value that indicates whether the sort is case-sensitive.
    • setCaseSensitive

      public void setCaseSensitive(boolean caseSensitive)
      Sets whether the sort is case-sensitive. The default is true.
      Parameters:
      caseSensitive - Indicates whether the sort is case-sensitive.
    • ascending

      public Order ascending()
      Sets the sort order as ascending. If not explicitly set, the default order is descending.
      Returns:
      The updated Order object.
    • descending

      public Order descending()
      Sets the sort order as descending. If not explicitly set, the default order is descending.
      Returns:
      The updated Order object.
    • caseSensitive

      public Order caseSensitive()
      Sets the sort as case-sensitive. If not explicitly set, the default is case-sensitive.
      Returns:
      The updated Order object.
    • caseInsensitive

      public Order caseInsensitive()
      Sets the sort as case-insensitive. If not explicitly set, the default is case-sensitive.
      Returns:
      The updated Order object.
    • column

      public Order column(Column column)
      Sets the column to sort.
      Returns:
      The updated Order object.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • order

      public static Order order(Column column, boolean ascending)
      Creates an Order object with the specified column and indicates whether to sort in ascending order.
      Returns:
      An Order object with the specified column and indicates whether to sort in ascending order.
    • order

      public static Order order(Column column, boolean ascending, boolean caseSensitive)
      Creates an Order object with the specified column and indicates whether to sort in ascending order and indicates whether it is case-sensitive.
      Returns:
      An Order object with the specified column and indicates whether to sort in ascending order and indicates whether it is case-sensitive.
    • ascending

      public static Order ascending(Column column)
      Creates an Order object with the specified column sorted in ascending order.
      Returns:
      An Order object with the specified column sorted in ascending order.
    • ascending

      public static Order ascending(Column column, boolean caseSensitive)
      Creates an Order object with the specified column sorted in ascending order and indicates whether it is case-sensitive.
      Returns:
      An Order object with the specified column sorted in ascending order and indicates whether it is case-sensitive.
    • descending

      public static Order descending(Column column)
      Creates an Order object with the specified column sorted in descending order.
      Returns:
      An Order object with the specified column sorted in descending order.
    • descending

      public static Order descending(Column column, boolean caseSensitive)
      Creates an Order object with the specified column sorted in descending order and indicates whether it is case-sensitive.
      Returns:
      An Order object with the specified column sorted in descending order and indicates whether it is case-sensitive.