KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > displaytag > pagination > PaginatedList


1 /**
2  * Licensed under the Artistic License; you may not use this file
3  * except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://displaytag.sourceforge.net/license.html
7  *
8  * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
9  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11  */

12 package org.displaytag.pagination;
13
14 import java.util.List JavaDoc;
15
16 import org.displaytag.properties.SortOrderEnum;
17
18
19 /**
20  * Interface describing an externally sorted and paginated list.
21  * @author JBN
22  */

23 public interface PaginatedList
24 {
25
26     /**
27      * Returns the current partial list
28      * @return the current partial list
29      */

30     List JavaDoc getList();
31
32     /**
33      * Returns the page number of the partial list (starts from 1)
34      * @return the page number of the partial list
35      */

36     int getPageNumber();
37
38     /**
39      * Returns the number of objects per page. Unless this page is the last one the partial list should thus have a size
40      * equal to the result of this method
41      * @return the number of objects per page
42      */

43     int getObjectsPerPage();
44
45     /**
46      * Returns the size of the full list
47      * @return the size of the full list
48      */

49     int getFullListSize();
50
51     /**
52      * Returns the sort criterion used to externally sort the full list
53      * @return the sort criterion used to externally sort the full list
54      */

55     String JavaDoc getSortCriterion();
56
57     /**
58      * Returns the sort direction used to externally sort the full list
59      * @return the sort direction used to externally sort the full list
60      */

61     SortOrderEnum getSortDirection();
62
63     /**
64      * Returns an ID for the search used to get the list. It may be null. Such an ID can be necessary if the full list
65      * is cached, in a way or another (in the session, in the business tier, or anywhere else), to be able to retrieve
66      * the full list from the cache
67      * @return the search ID
68      */

69     String JavaDoc getSearchId();
70 }
Popular Tags