@Status(stage=PRODUCTION, unitTests=COMPLETE) @Reviews(value=@Review(by="Kees Schotanus",at="2009-04-11")) public class OrderByClause extends Object implements Serializable
OrderByColumn
columns. Use this class to create an 'ORDER BY' clause that can be used in
combination with JP/QL.| Constructor and Description |
|---|
OrderByClause(OrderByColumn... allowedOrderByColumns)
Constructs this OrderByClause from the supplied allowedOrderByColumns.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object)
Determines whether this OrderByClause is equal to the supplied object.
|
OrderByColumn |
getOrderByColumn(int ordinal)
Gets an OrderByColumn by its ordinal number.
|
OrderByColumn |
getOrderByColumn(String columnName)
Gets an OrderByColumn by its column name.
|
int |
hashCode()
Computes the hash code of this OrderByClause.
|
void |
setOrderByColumns(OrderByColumn... orderByColumns)
Sets the columns to order by.
|
String |
toOrderByString(Locale locale)
Creates a String suitable to be used in an order by clause.
|
String |
toString()
Creates a String representation of this OrderByClause.
|
public OrderByClause(OrderByColumn... allowedOrderByColumns)
allowedOrderByColumns - All columns that can be used to order by.NullPointerException - When the supplied allowedOrderByColumns is null.IllegalArgumentException - When the supplied allowedOrderByColumns is empty.public void setOrderByColumns(OrderByColumn... orderByColumns)
Order.ASCENDING order.getOrderByColumn(int) or getOrderByColumn(String) to locate
a column and reuse it.orderByColumns - The columns to order by.NullPointerException - When the supplied orderByColumns is null.IllegalArgumentException - When the supplied orderByColumns is empty or contains an OrderByColumn that is not one
of the allowed OrderByColumns supplied at construction time.public OrderByColumn getOrderByColumn(String columnName)
columnName - The name of the column.IllegalArgumentException - When no OrderByColumn with the supplied columnName exists.public OrderByColumn getOrderByColumn(int ordinal)
ordinal - The ordinal column number (0 based).IllegalArgumentException - When no OrderByColumn with the supplied ordinal exists.public String toString()
OrderByColumn.toString() method.public String toOrderByString(Locale locale)
locale - The locale to localize the optional constants, that may be present in one of the
order by columns.
public boolean equals(Object object)
OrderByColumn.equals(Object).
Copyright © 2008–2017. All rights reserved.