Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.torque.sql
Class OrderBy

    java.lang.Object
      org.apache.torque.sql.OrderBy

All Implemented Interfaces:
  Serializable

    public class OrderBy

extends Object
implements Serializable

An order by clause.

Version:
  $Id: OrderBy.java 1448414 2013-02-20 21:06:35Z tfischer $
See Also:
  Serialized Form

Constructor Summary
`OrderBy(Column column, SqlEnum order, boolean ignoreCase)` Constructor.

Method Summary
`boolean` | `equals(Object obj)` Checks whether two orderBy are equal.
`Column` | `getColumn()` Returns the column to order by.
`SqlEnum` | `getOrder()` Returns the order to order by (ASC or DESC).
`int` | `hashCode()`
`boolean` | `isIgnoreCase()` Returns whether case should be ignored for String columns.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OrderBy

    public OrderBy(Column column,
                   SqlEnum order,
                   boolean ignoreCase)

  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 Detail

### getColumn

    public Column getColumn()

  Returns the column to order by.

  Returns:
    the column to order by, not null.

### getOrder

    public SqlEnum 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()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  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.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `obj` - the object to compare to.
  Returns:
    true if this object is equal to obj, false otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2013 The Apache Software Foundation. All Rights Reserved.