Package com.sas.lsaf.query
Class Order
- java.lang.Object
-
- com.sas.lsaf.query.Order
-
- All Implemented Interfaces:
java.io.Serializable
public class Order extends java.lang.Object implements java.io.Serializable
The class that represents the sorting method of the queried information by a column.- Since:
- 2.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Order()
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Order
ascending()
Sets the sort order as ascending.static Order
ascending(Column column)
Creates anOrder
object with the specified column sorted in ascending order.static Order
ascending(Column column, boolean caseSensitive)
Creates anOrder
object with the specified column sorted in ascending order and indicates whether it is case-sensitive.Order
caseInsensitive()
Sets the sort as case-insensitive.Order
caseSensitive()
Sets the sort as case-sensitive.Order
column(Column column)
Sets the column to sort.Order
descending()
Sets the sort order as descending.static Order
descending(Column column)
Creates anOrder
object with the specified column sorted in descending order.static Order
descending(Column column, boolean caseSensitive)
Creates anOrder
object with the specified column sorted in descending order and indicates whether it is case-sensitive.Column
getColumn()
Gets the column to sort.boolean
isAscending()
Indicates whether to sort in ascending order.boolean
isCaseSensitive()
Indicates whether the sort is case-sensitive.boolean
isDescending()
Indicates whether to sort in descending order.static Order
order(Column column, boolean ascending)
Creates anOrder
object with the specified column and indicates whether to sort in ascending order.static Order
order(Column column, boolean ascending, boolean caseSensitive)
Creates anOrder
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.java.lang.String
toString()
-
-
-
Constructor Detail
-
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 Detail
-
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 isfalse
.- Parameters:
ascending
- Indicates whether to sort in ascending order.
-
isDescending
public boolean isDescending()
Indicates whether to sort in descending order. The default istrue
.- 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 isfalse
.- 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 istrue
.- 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 istrue
.- 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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
order
public static Order order(Column column, boolean ascending)
Creates anOrder
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 anOrder
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 anOrder
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 anOrder
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 anOrder
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 anOrder
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.
-
-