com.webmethods.caf.faces.data
Interface ISortInfo

All Known Implementing Classes:
SortInfo

public interface ISortInfo

Table sort information. Used by ISortableTableContentProvider


Method Summary
 IContentProvider getAscendings()
          Return content provider for mapping keys to ascending values.
 Object getKey(int ordinal)
          Sort key.
 int getOrdinal(Object key)
          Sort ordinal associated with specified key.
 IContentProvider getOrdinals()
          Return content provider for mapping keys to ordinal values.
 boolean isAscending(int ordinal)
          Sort order.
 boolean isAscending(Object key)
          Sort order associated with specified key.
 int size()
          Return number of sort keys.
 

Method Detail

size

int size()
Return number of sort keys. May be zero.

Returns:
number of sort keys

getKey

Object getKey(int ordinal)
Sort key. The 1st key is the primary key, the 2nd key is the secondary key, etc.

Parameters:
ordinal - Must be > 0 and <= ISortInfo.size().
Returns:
Non-null, non-empty key.
Throws:
IndexOutOfBoundsException - If ordinal <= 1 or > ISortInfo.size().

isAscending

boolean isAscending(int ordinal)
Sort order. The 1st order is the primary order, the 2nd order is the secondary order, etc.

Parameters:
ordinal - Must be > 0 and <= ISortInfo.size().
Returns:
True if order is a-z, 1-10, Jan-Dec, etc.
Throws:
IndexOutOfBoundsException - If ordinal <= 1 or > ISortInfo.size().

isAscending

boolean isAscending(Object key)
Sort order associated with specified key.

Parameters:
key - the sort key.
Returns:
True if order is a-z, 1-10, Jan-Dec, etc., or if key is not present.

getOrdinal

int getOrdinal(Object key)
Sort ordinal associated with specified key.

Parameters:
key - sort ordinal
Returns:
Ordinal, or zero if key is not present.

getOrdinals

IContentProvider getOrdinals()
Return content provider for mapping keys to ordinal values.

Returns:
content provider implementation

getAscendings

IContentProvider getAscendings()
Return content provider for mapping keys to ascending values.

Returns:
content provider implementation