|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wewebu.ow.server.field.OwSort
public class OwSort
Sorts contain a list of sort criteria.
Sort is used with OwObjectList.sort(...) and OwNetwork.doSearch(...) Function.
Automatically keeps the size of the list to a specified maximum, when using addCriteria(...).
To be extended with the specific DMS system.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Nested Class Summary | |
---|---|
static class |
OwSort.OwSortCriteria
Sort criteria tuple containing property and order direction. |
Field Summary | |
---|---|
protected boolean |
m_fDefaultAsc
default sort order for new criteria |
protected int |
m_iMax
the maximum number of sort criteria in the sort list default is 1 |
protected List |
m_SortList
list containing the sort OwSortCriteria NOTE: We actually need a Hash Access to the sort criteria and the sort criteria must be predictable ordered With JDK 1.4 we could use a LinkedHashMap, but with JDK 1.3 we must use a List |
Constructor Summary | |
---|---|
OwSort()
constructs empty sort criteria list with maxsize = 1 and default sort order asc = true |
|
OwSort(int iMaxSize_p,
boolean fAsc_p)
constructs empty sort criteria list with specified maxsize if the number of sort criteria exceeds the maximum value, the first sort criteria gets removed |
Method Summary | |
---|---|
void |
addCriteria(OwSort.OwSortCriteria criteria_p)
add a sort criteria to the sort |
OwSort.OwSortCriteria |
getCriteria(String strPropertyName_p)
get the specified criteria |
Collection |
getCriteriaCollection()
get a collection over the criteria. |
boolean |
getDefaultAsc()
get default sort order for new criteria |
OwSort.OwSortCriteria |
getLastCriteria()
get the last criteria, i.e. |
int |
getMaxSize()
get the maximum number of sort criteria in the sort list |
int |
getPriority(OwSort.OwSortCriteria criteria_p)
get the priority of the criteria, last criteria has highest priority |
int |
getSize()
get the size of the criteria list |
void |
removeCriteria(String strPropertyName_p)
remove the specified criteria |
void |
setCriteria(String strPropertyName_p,
boolean fAsc_p)
toggle existing criteria or add a criteria to the sort list if it does not yet exist if the number of sort criteria exceeds the maximum value, the first sort criteria gets removed |
void |
setMaxSize(int iMax_p)
set the maximum number of sort criteria in the sort list. |
void |
toggleCriteria(String strPropertyName_p)
toggle existing criteria or add a criteria to the sortlist if it does not yet exist if the number of sort criteria exceeds the maximum value, the first sort criteria gets removed |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected List m_SortList
protected int m_iMax
protected boolean m_fDefaultAsc
Constructor Detail |
---|
public OwSort()
public OwSort(int iMaxSize_p, boolean fAsc_p)
iMaxSize_p
- the maximum number of sort criteria in the sort list.fAsc_p
- sort order true = ascending, false = descendingMethod Detail |
---|
public int getMaxSize()
public boolean getDefaultAsc()
public void setMaxSize(int iMax_p)
iMax_p
- maximum number of sort criteriapublic int getSize()
public Collection getCriteriaCollection()
public void addCriteria(OwSort.OwSortCriteria criteria_p)
criteria_p
- OwSortCriteria to addpublic void removeCriteria(String strPropertyName_p)
strPropertyName_p
- Property name or criteria to removepublic OwSort.OwSortCriteria getLastCriteria()
public OwSort.OwSortCriteria getCriteria(String strPropertyName_p)
strPropertyName_p
- Property name to sort for
public void toggleCriteria(String strPropertyName_p)
strPropertyName_p
- Property name to sort forpublic int getPriority(OwSort.OwSortCriteria criteria_p)
criteria_p
-
public void setCriteria(String strPropertyName_p, boolean fAsc_p)
strPropertyName_p
- Property name to sort forpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |