01: /*
02: * Coefficient - facilitates project based collaboration
03: * Copyright (C) 2003, Dylan Etkin, CSIR icomtek
04: * PO Box 395
05: * Pretoria 0001, RSA
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or (at your option) any later version.
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: */
19:
20: package za.org.coefficient.interfaces;
21:
22: import java.util.*;
23:
24: /**
25: * <p>Title: Project Engine</p>
26: * <p>Description: An interface to a Pager mechanism. The pager maintains
27: * some underlying data source in a paged structure, allowing for page by
28: * page retrieval of data.</p>
29: * <p>Copyright: Copyright (c) 2002</p>
30: * <p>Company: CSIR</p>
31: * @author Thomas Fogwill
32: * @version 1.0
33: */
34: public interface Pager extends java.io.Serializable {
35: //~ Methods ================================================================
36:
37: /**
38: * Returns the data in the current page.
39: * @returns The data in the current page.
40: */
41: public List currentPage();
42:
43: /**
44: * Checks whether there is a "next" page of data
45: * @returns True id there a "next" page of data, false otherwise.
46: */
47: public boolean hasNextPage();
48:
49: /**
50: * Checks whether there is a "previous" page of data
51: * @returns True id there a "previous" page of data, false otherwise.
52: */
53: public boolean hasPreviousPage();
54:
55: /**
56: * Moves to the next page of data.
57: */
58: public void next();
59:
60: /**
61: * Moves to the next page of data, and returns the data in that page.
62: * @returns The data in the next page.
63: */
64: public List nextPage();
65:
66: /**
67: * Moves to the previous page of data.
68: */
69: public void previous();
70:
71: /**
72: * Moves to the previous page of data, and returns the data in that page.
73: * @returns The data in the previous page.
74: */
75: public List previousPage();
76: }
|