1 /*
2 * Copyright 2004-2026 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package com.ibatis.common.util;
17
18 import java.util.List;
19
20 /**
21 * Interface for lists that support paging.
22 *
23 * @deprecated All paginated list features have been deprecated
24 */
25 @Deprecated
26 public interface PaginatedList extends List {
27
28 /**
29 * Returns the maximum number of items per page.
30 *
31 * @return The maximum number of items per page.
32 */
33 @Deprecated
34 int getPageSize();
35
36 /**
37 * Is the current page the first page?.
38 *
39 * @return True if the current page is the first page or if only a single page exists.
40 */
41 @Deprecated
42 boolean isFirstPage();
43
44 /**
45 * Is the current page a middle page (ie not first or last)?.
46 *
47 * @return True if the current page is not the first or last page, and more than one page exists (always returns false
48 * if only a single page exists).
49 */
50 @Deprecated
51 boolean isMiddlePage();
52
53 /**
54 * Is the current page the last page?.
55 *
56 * @return True if the current page is the last page or if only a single page exists.
57 */
58 @Deprecated
59 boolean isLastPage();
60
61 /**
62 * Is a page available after the current page?.
63 *
64 * @return True if the next page is available
65 */
66 @Deprecated
67 boolean isNextPageAvailable();
68
69 /**
70 * Is a page available before the current page?.
71 *
72 * @return True if the previous page is available
73 */
74 @Deprecated
75 boolean isPreviousPageAvailable();
76
77 /**
78 * Moves to the next page after the current page. If the current page is the last page, wrap to the first page.
79 *
80 * @return True if the page changed
81 */
82 @Deprecated
83 boolean nextPage();
84
85 /**
86 * Moves to the page before the current page. If the current page is the first page, wrap to the last page.
87 *
88 * @return True if the page changed
89 */
90 @Deprecated
91 boolean previousPage();
92
93 /**
94 * Moves to a specified page. If the specified page is beyond the last page, wrap to the first page. If the specified
95 * page is before the first page, wrap to the last page.
96 *
97 * @param pageNumber
98 * The page to go to
99 */
100 @Deprecated
101 void gotoPage(int pageNumber);
102
103 /**
104 * Returns the current page index, which is a zero based integer. All paginated list implementations should know what
105 * index they are on, even if they don't know the ultimate boundaries (min/max).
106 *
107 * @return The current page
108 */
109 @Deprecated
110 int getPageIndex();
111
112 }