|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.faces.data.object.SortInfo
public class SortInfo
Implementation of table sort information bean.
Nested Class Summary | |
---|---|
class |
SortInfo.AscendingsContentProvider
Maps column keys to ascending values. |
static class |
SortInfo.Ordinal
|
class |
SortInfo.OrdinalsContentProvider
Maps column keys to ordinal values. |
Field Summary | |
---|---|
protected List |
m_ordinals
|
Constructor Summary | |
---|---|
SortInfo()
New, empty sort info constructor |
|
SortInfo(ISortInfo sort)
Shallow copy of existing sort info. |
|
SortInfo(String s)
Sort info from SortInfo.toString() (with string keys). |
Method Summary | |
---|---|
void |
add(int ordinal,
Object key,
boolean ascending)
Adds an ordinal. |
void |
add(Object key,
boolean ascending)
Adds as last ordinal. |
void |
clear()
Removes all ordinals. |
boolean |
equals(Object o)
|
void |
fromString(String s)
Reverses SortInfo.toString() (with string keys). |
IContentProvider |
getAscendings()
Return content provider for mapping keys to ascending values. |
Object |
getKey(int ordinal)
Sort key. |
protected SortInfo.Ordinal |
getOrdinal(int ordinal)
|
int |
getOrdinal(Object key)
Sort ordinal associated with specified key. |
IContentProvider |
getOrdinals()
Return content provider for mapping keys to ordinal values. |
int |
hashCode()
|
boolean |
isAscending(int ordinal)
Sort order. |
boolean |
isAscending(Object key)
Sort order associated with specified key. |
void |
move(int fromOrdinal,
int toOrdinal)
Moves from first ordinal to second ordinal. |
void |
remove(int ordinal)
Removes an ordinal. |
int |
size()
Return number of sort keys. |
void |
toggleAscending(int ordinal)
Toggles between ascending and descending for ordinal. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected List m_ordinals
Constructor Detail |
---|
public SortInfo()
public SortInfo(String s)
SortInfo.toString()
(with string keys).
public SortInfo(ISortInfo sort)
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public int size()
ISortInfo
size
in interface ISortInfo
public Object getKey(int ordinal)
ISortInfo
getKey
in interface ISortInfo
ordinal
- Must be > 0 and <= ISortInfo.size()
.
public boolean isAscending(int ordinal)
ISortInfo
isAscending
in interface ISortInfo
ordinal
- Must be > 0 and <= ISortInfo.size()
.
public boolean isAscending(Object key)
ISortInfo
isAscending
in interface ISortInfo
key
- the sort key.
public int getOrdinal(Object key)
ISortInfo
getOrdinal
in interface ISortInfo
key
- sort ordinal
public IContentProvider getOrdinals()
ISortInfo
getOrdinals
in interface ISortInfo
SortInfo.OrdinalsContentProvider
public IContentProvider getAscendings()
ISortInfo
getAscendings
in interface ISortInfo
SortInfo.AscendingsContentProvider
public void toggleAscending(int ordinal)
public void add(Object key, boolean ascending)
key
- Non-null, non-empty key.ascending
- True if order is a-z, 1-10, Jan-Dec, etc.public void add(int ordinal, Object key, boolean ascending)
ordinal
- Must be > 0 and <= SortInfo.size()
.key
- Non-null, non-empty key.ascending
- True if order is a-z, 1-10, Jan-Dec, etc.
IndexOutOfBoundsException
- If ordinal <= 1 or > SortInfo.size()
+ 1.public void remove(int ordinal)
ordinal
- Must be > 0 and <= SortInfo.size()
.
IndexOutOfBoundsException
- If ordinal <= 1 or > SortInfo.size()
.public void move(int fromOrdinal, int toOrdinal)
fromOrdinal
- Must be > 0 and <= SortInfo.size()
.toOrdinal
- Must be > 0 and <= SortInfo.size()
.
IndexOutOfBoundsException
- If either ordinal <= 1 or > SortInfo.size()
.public void clear()
public void fromString(String s)
SortInfo.toString()
(with string keys).
protected SortInfo.Ordinal getOrdinal(int ordinal)
ordinal
- Must be > 0 and <= SortInfo.size()
.
IndexOutOfBoundsException
- If ordinal <= 1 or > SortInfo.size()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |