javax.rad.model
Class SortDefinition

java.lang.Object
  extended by javax.rad.model.SortDefinition
All Implemented Interfaces:
Serializable

public class SortDefinition
extends Object
implements Serializable

The SortDefinition class specifies the sort order to use.

Example:

 
 SortDefinition sSort = new SortDefinition(new String[] { "NAME"}, new boolean [] { true });
 dbDataBook.setSort(sSort);
 dbDataBook.open();
 
 

See Also:
RemoteDataBook, DBAccess, Serialized Form

Constructor Summary
SortDefinition()
          Creates a new instance of SortDefinition.
SortDefinition(boolean pAscending, String... pColumnNames)
          Constructs a SortDefinition object with the column names to sort and the boolean to use for all columns to sort ascending (=true) or descending (=false).
SortDefinition(String... pColumnNames)
          Constructs a SortDefinition object with the column names to sort and a default boolean Array which defines if the corresponding (same index) is sorted ascending (=true).
SortDefinition(String[] pColumnNames, boolean[] pAscending)
          Constructs a SortDefinition object with the column names to sort , the boolean Array which defines if the corresponding (same index) is sorted ascending (=true) or descending (=false).
 
Method Summary
 SortDefinition clone()
          Clone an ISortDefinition.
 String[] getColumns()
          Returns the columns to sort.
 boolean[] isAscending()
          Returns the boolean Array which defines if the corresponding (same index) column is sorted ascending (=true) or descending (=false).
 void setAscending(boolean... pAscending)
          Sets the the boolean Array which defines if the corresponding (same index) column is sorted ascending (=true) or descending (=false).
 void setColumns(String... pColumnNames)
          Sets the columns to sort.
 String toString()
          
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortDefinition

public SortDefinition()
Creates a new instance of SortDefinition.


SortDefinition

public SortDefinition(String... pColumnNames)
Constructs a SortDefinition object with the column names to sort and a default boolean Array which defines if the corresponding (same index) is sorted ascending (=true).

Parameters:
pColumnNames - the column names to sort, as String[]

SortDefinition

public SortDefinition(boolean pAscending,
                      String... pColumnNames)
Constructs a SortDefinition object with the column names to sort and the boolean to use for all columns to sort ascending (=true) or descending (=false).

Parameters:
pColumnNames - the column names to sort, as String[]
pAscending - the boolean to use for all columns to sort ascending (=true) or descending (=false).

SortDefinition

public SortDefinition(String[] pColumnNames,
                      boolean[] pAscending)
Constructs a SortDefinition object with the column names to sort , the boolean Array which defines if the corresponding (same index) is sorted ascending (=true) or descending (=false).

Parameters:
pColumnNames - the column names to sort, as String[]
pAscending - the boolean Array which defines if the corresponding (same index) is sorted ascending (=true) or descending (=false)
Method Detail

clone

public SortDefinition clone()
Clone an ISortDefinition.

Overrides:
clone in class Object
Returns:
a clone of this ISortDefinition
See Also:
Object.clone()

getColumns

public String[] getColumns()
Returns the columns to sort.

Returns:
the columns to sort.

setColumns

public void setColumns(String... pColumnNames)
Sets the columns to sort.

Parameters:
pColumnNames - the columns to sort

isAscending

public boolean[] isAscending()
Returns the boolean Array which defines if the corresponding (same index) column is sorted ascending (=true) or descending (=false).

Returns:
the boolean Array which defines if the corresponding (same index) column is sorted ascending (=true) or descending (=false).

setAscending

public void setAscending(boolean... pAscending)
Sets the the boolean Array which defines if the corresponding (same index) column is sorted ascending (=true) or descending (=false).

Parameters:
pAscending - the boolean Array which defines if the corresponding (same index) column is sorted ascending (=true) or descending (=false)

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.