|
Compoze Software, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.compoze.todo.ToDos
This class represents a to do. The to do collection may be used to iterate through to dos. By default, the to do colleciton is sorted by due date in ascending order.
The to do collection may also be used for searching. The following code segment shows how to reduce the to do that are returned in the collection to ones with a particular name and implies sorting:
ToDoSession s = ToDoSession.getSession(user);
ToDos todos = s.getToDos();
ToDoFilter filter = new ToDoFilter();
filter.setSummary("Management Report");
todos.setFilter(filter);
todos.sort(SortOrder.ASCENDING, ToDoProperty.SUMMARY);
Iterator it = todos.todos().iterator();
while(it.hasNext())
{
ToDo td = (ToDo)it.next();
...
}
| Method Summary | |
ToDo |
add()
Adds a to do to the collection. |
void |
clearFilter()
Clears the to do filter for this collection of to dos. |
void |
clearSort()
Clears the sorting for this collection of to dos. |
int |
getCount()
Gets the number of to dos in the collection. |
int |
getCurrentPageNumber()
Gets the number of the current page. |
ToDoFilter |
getFilter()
Gets the to do filter. |
int |
getNextPageNumber()
Gets the number of the next page. |
int |
getPageCount()
Gets the total number of pages in the object for pagination. |
int |
getPageSize()
Gets the number of to dos to appear on a single page. |
int |
getPreviousPageNumber()
Gets the number of the previous page. |
int |
getShowingFrom()
Gets the from index. |
int |
getShowingTo()
Gets the to index. |
SortOrder |
getSort()
Gets the sort order. |
ToDoProperty[] |
getSortProperties()
Gets the sort properties. |
ToDoProperty |
getSortProperty()
Gets the sort property. |
ToDo |
getToDo(long id)
Gets a to do with the given id. |
boolean |
isFirstPage()
Checks if current page is the first page. |
boolean |
isLastPage()
Checks if current page is the last page. |
void |
setFilter(ToDoFilter filter)
Sets the to do filter. |
void |
setPageSize(int iPageSize)
Sets the number of todos to appear on a single page. |
void |
sort(SortOrder order,
ToDoProperty property)
Sorts the to dos in the collection. |
void |
sort(SortOrder order,
ToDoProperty[] properties)
Sorts the to dos in the collection. |
ToDoList |
todos()
Gets the list of all to dos the authenticated user has READ access to. |
ToDoList |
todos(int iPageNumber)
Gets the sublist of to dos on the specified page number. |
ToDoList |
todos(int iFromIndex,
int iToIndex)
Gets the sublist of to dos between the specified iFromIndex and iToIndex. |
java.lang.String |
toString()
Returns the string representation of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public ToDo add()
null if create failspublic void setFilter(ToDoFilter filter)
clearFilter().null)public ToDoFilter getFilter()
null if no filter is setpublic void clearFilter()
public int getPageSize()
getPageSize in interface com.compoze.common.IPaginationpublic void setPageSize(int iPageSize)
setPageSize in interface com.compoze.common.IPaginationiPageSize - the number of to dos on a single page (must be greater than zero)public int getPageCount()
getPageCount in interface com.compoze.common.IPaginationpublic int getShowingFrom()
todos() methods, the from index is returned.
- Specified by:
getShowingFrom in interface com.compoze.common.IPagination
- Returns:
- the from index or -1 if all to dos were returned
- See Also:
todos(),
todos(int),
todos(int, int)
public int getShowingTo()
todos() methods, the to index is returned.
- Specified by:
getShowingTo in interface com.compoze.common.IPagination
- Returns:
- the from index or -1 if all to dos were returned
- See Also:
todos(),
todos(int),
todos(int, int)
public int getCurrentPageNumber()
getCurrentPageNumber in interface com.compoze.common.IPaginationpublic int getNextPageNumber()
getNextPageNumber in interface com.compoze.common.IPaginationpublic int getPreviousPageNumber()
getPreviousPageNumber in interface com.compoze.common.IPaginationpublic boolean isFirstPage()
isFirstPage in interface com.compoze.common.IPaginationtrue if this is the first page; false otherwisepublic boolean isLastPage()
isLastPage in interface com.compoze.common.IPaginationtrue if this is the last page; false otherwisepublic ToDoList todos(int iPageNumber)
getPageSize().iPageNumber - the page number (must be greater than zero and less than the total page count)ToDo objectsgetPageCount()public ToDoList todos()
READ access to.ToDo objects
public ToDoList todos(int iFromIndex,
int iToIndex)
iFromIndex and iToIndex.iFromIndex - the from index endpoint (inclusive) of the listiToIndex - the to index highpoint (exclusive) of the listToDo objectspublic int getCount()
public ToDo getToDo(long id)
throws java.security.AccessControlException
id - the to do idnull if not found
public void sort(SortOrder order,
ToDoProperty property)
sortOrder - the sort orderproperty - the property to sort by (may not be null)
public void sort(SortOrder order,
ToDoProperty[] properties)
sortOrder - the sort orderprops - the properties to sort bypublic void clearSort()
public SortOrder getSort()
null if not sorting is imposedpublic ToDoProperty getSortProperty()
null if no property setgetSortProperties()public ToDoProperty[] getSortProperties()
null if no property setpublic java.lang.String toString()
toString in class java.lang.Object
|
Compoze Software, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||