Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
ITablePagingState |
|
| 1.0;1 |
1 | // Copyright 2004, 2005 The Apache Software Foundation |
|
2 | // |
|
3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
|
4 | // you may not use this file except in compliance with the License. |
|
5 | // You may obtain a copy of the License at |
|
6 | // |
|
7 | // http://www.apache.org/licenses/LICENSE-2.0 |
|
8 | // |
|
9 | // Unless required by applicable law or agreed to in writing, software |
|
10 | // distributed under the License is distributed on an "AS IS" BASIS, |
|
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
12 | // See the License for the specific language governing permissions and |
|
13 | // limitations under the License. |
|
14 | ||
15 | package org.apache.tapestry.contrib.table.model; |
|
16 | ||
17 | /** |
|
18 | * An interface defining the management of the table's paging state. |
|
19 | * |
|
20 | * @author mindbridge |
|
21 | */ |
|
22 | public interface ITablePagingState |
|
23 | { |
|
24 | ||
25 | /** |
|
26 | * Method getPageSize provides the size of a page in a number of records. |
|
27 | * This value may be meaningless if the model uses a different method for |
|
28 | * pagination. |
|
29 | * |
|
30 | * @return int the current page size |
|
31 | */ |
|
32 | int getPageSize(); |
|
33 | ||
34 | /** |
|
35 | * Method setPageSize updates the size of a page in a number of records. |
|
36 | * This value may be meaningless if the model uses a different method for |
|
37 | * pagination. |
|
38 | * |
|
39 | * @param nPageSize |
|
40 | * the new page size |
|
41 | */ |
|
42 | void setPageSize(int nPageSize); |
|
43 | ||
44 | /** |
|
45 | * Gets the currently selected page. The page number is counted from 0. |
|
46 | * |
|
47 | * @return int the current active page |
|
48 | */ |
|
49 | int getCurrentPage(); |
|
50 | ||
51 | /** |
|
52 | * Sets the newly selected page. The page number is counted from 0. |
|
53 | * |
|
54 | * @param nPage |
|
55 | * the new active page |
|
56 | */ |
|
57 | void setCurrentPage(int nPage); |
|
58 | } |