public class Order extends Object implements Serializable
Order
class provides a way for sorting queried information by a column.Constructor and Description |
---|
Order()
Default constructor.
|
Order(Column column)
Constructor with the column to sort.
|
Order(Column column,
boolean ascending)
Constructor with the column to sort and whether to sort in ascending order.
|
Order(Column column,
boolean ascending,
boolean caseSensitive)
Constructor with the column to sort and whether to sort in ascending order and whether it should be
case-sensitive.
|
Modifier and Type | Method and Description |
---|---|
Order |
ascending()
Sets the sort order as ascending.
|
static Order |
ascending(Column column)
Creates an
Order with the specified column sorted in ascending order. |
static Order |
ascending(Column column,
boolean caseSensitive)
Creates an
Order with the specified column sorted in ascending order and whether it should be
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 order.
|
Order |
descending()
Sets the sort order as descending.
|
static Order |
descending(Column column)
Creates an
Order with the specified column sorted in descending order. |
static Order |
descending(Column column,
boolean caseSensitive)
Creates an
Order with the specified column sorted in descending order and whether it should be
case-sensitive. |
Column |
getColumn()
Gets the column to sort.
|
boolean |
isAscending()
Indicates whether to sort in ascending order.
|
boolean |
isCaseSensitive()
Indicates whether the sort should be case-sensitive.
|
boolean |
isDescending()
Indicates whether to sort in descending order.
|
static Order |
order(Column column,
boolean ascending)
Creates an
Order with the specified column and whether to sort in ascending order. |
static Order |
order(Column column,
boolean ascending,
boolean caseSensitive)
Creates an
Order with the specified column and whether to sort in ascending order and whether it
should be case-sensitive. |
void |
setAscending(boolean ascending)
Sets whether to sort in ascending order.
|
void |
setCaseSensitive(boolean caseSensitive)
Sets whether to sort should be case-sensitive.
|
void |
setColumn(Column column)
Sets the column to sort.
|
String |
toString() |
public Order()
public Order(Column column)
column
- Column to order.public Order(Column column, boolean ascending)
column
- Column to order.ascending
- Whether to sort in ascending order.public Order(Column column, boolean ascending, boolean caseSensitive)
column
- Column to order.ascending
- Whether to sort in ascending order.caseSensitive
- Whether the sort should be case-sensitive.public Column getColumn()
public void setColumn(Column column)
column
- The column to sort.public void setAscending(boolean ascending)
false
.ascending
- Indicates whether the order should in ascending order.public boolean isDescending()
true
.boolean
value that indicates whether the order should in descending order.public boolean isAscending()
false
.boolean
value that indicates whether to sort in ascending order.public boolean isCaseSensitive()
true
.boolean
value that indicates whether to sort in ascending order.public void setCaseSensitive(boolean caseSensitive)
true
.caseSensitive
- Whether the order should be case-sensitive.public Order ascending()
public Order descending()
public Order caseSensitive()
public Order caseInsensitive()
public static Order order(Column column, boolean ascending)
Order
with the specified column and whether to sort in ascending order.Order
object with the specified column and whether to sort in ascending order.public static Order order(Column column, boolean ascending, boolean caseSensitive)
Order
with the specified column and whether to sort in ascending order and whether it
should be case-sensitive.Order
object with the specified column and whether to sort in ascending order and
whether it should be case-sensitive.public static Order ascending(Column column)
Order
with the specified column sorted in ascending order.Order
object with the specified column sorted in ascending order.public static Order ascending(Column column, boolean caseSensitive)
Order
with the specified column sorted in ascending order and whether it should be
case-sensitive.Order
object with the specified column sorted in ascending order and whether it should
be case-sensitive.public static Order descending(Column column)
Order
with the specified column sorted in descending order.Order
object with the specified column sorted in descending order.public static Order descending(Column column, boolean caseSensitive)
Order
with the specified column sorted in descending order and whether it should be
case-sensitive.Order
object with the specified column sorted in descending order and whether it
should be case-sensitive.Copyright (c) 2020, SAS Institute Inc., Cary, NC, USA