Package org.apache.torque.sql
Class OrderBy
java.lang.Object
org.apache.torque.sql.OrderBy
- All Implemented Interfaces:
Serializable
An order by clause.
- Version:
- $Id: OrderBy.java 1917245 2024-04-21 14:06:23Z tv $
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OrderBy
Constructor.- Parameters:
column- the column to order by, not null.order- the order, either SqlEnum.DESC or SqlEnum.ASC, not null.ignoreCase- whether case should be ignored for String columns- Throws:
NullPointerException- if null is passed.IllegalArgumentException- if an unknown order is passed.
-
-
Method Details
-
getColumn
Returns the column to order by.- Returns:
- the column to order by, not null.
-
getOrder
Returns the order to order by (ASC or DESC).- Returns:
- the order, either SqlEnum.DESC or SqlEnum.ASC, not null.
-
isIgnoreCase
public boolean isIgnoreCase()Returns whether case should be ignored for String columns.- Returns:
- true if case should be ignored for String columns, false otherwise.
-
hashCode
public int hashCode() -
equals
Checks whether two orderBy are equal. This is true if and only if the orders are equal and if the contained columns have the same schema name, table name, column name and sql expression.
-