de.esprit.appsuite.database.dbase

## Class SqlOrder

- java.lang.Object
- - de.esprit.appsuite.database.dbase.SqlOrder

- All Implemented Interfaces:
    java.io.Serializable

      public class SqlOrder
      extends java.lang.Object
      implements java.io.Serializable

  This class allows for constructing SQL order clause in an object oriented manner.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SqlOrder()`
    `SqlOrder(DBColumnKey columnKey)`
    `SqlOrder(DBColumnKey columnKey, boolean isAscending)`
    `SqlOrder(java.lang.String columnName)`
    `SqlOrder(java.lang.String columnName, boolean isAscending)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(DBColumnKey columnKey)`
    `void` | `add(DBColumnKey columnKey, boolean isAscending)`
    `void` | `add(java.lang.String columnName)` Add a column for ASCENDING sort
    `void` | `add(java.lang.String columnName, boolean isAscending)` Add a sort column
    `java.lang.String` | `getOrderClause()` Returns the SQL ORDER clause represented by this object
    `boolean` | `isEmpty()`
    `java.lang.String` | `toString()` Returns the SQL order clause

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SqlOrder

          public SqlOrder()

    - #### SqlOrder

          public SqlOrder(java.lang.String columnName)

    - #### SqlOrder

          public SqlOrder(java.lang.String columnName,
                  boolean isAscending)

    - #### SqlOrder

          public SqlOrder(DBColumnKey columnKey)

    - #### SqlOrder

          public SqlOrder(DBColumnKey columnKey,
                  boolean isAscending)

  - ### Method Detail

    - #### isEmpty

          public boolean isEmpty()

    - #### add

          public void add(java.lang.String columnName,
                 boolean isAscending)

      Add a sort column
      Parameters:
        `columnName` - the sort column
        `isAscending` - tells whether ASCENDING or DESCENDING order should be used

    - #### add

          public void add(java.lang.String columnName)

      Add a column for ASCENDING sort

    - #### add

          public void add(DBColumnKey columnKey,
                 boolean isAscending)

    - #### add

          public void add(DBColumnKey columnKey)

    - #### toString

          public java.lang.String toString()

      Returns the SQL order clause
      Overrides:
        `toString` in class `java.lang.Object`

    - #### getOrderClause

          public java.lang.String getOrderClause()

      Returns the SQL ORDER clause represented by this object

Copyright © 2014 EsprIT-Systems. All Rights Reserved.