Package org.apache.dubbo.common.utils
Interface Page<T>
- All Known Implementing Classes:
DefaultPage
public interface Page<T>
The model class of pagination
- Since:
- 2.7.5
-
Method Summary
Modifier and TypeMethodDescriptiongetData()The data of current pagedefault intThe size ofdataintGets the offset of requestintGets the size of request for pagination queryintGet the number of total pages.intGets the total amount of elements.default booleanhasData()Returns whether the page has data at all.booleanhasNext()It indicates has next page or not
-
Method Details
-
getOffset
int getOffset()Gets the offset of request- Returns:
- positive integer
-
getPageSize
int getPageSize()Gets the size of request for pagination query- Returns:
- positive integer
-
getTotalSize
int getTotalSize()Gets the total amount of elements.- Returns:
- the total amount of elements
-
getTotalPages
int getTotalPages()Get the number of total pages.- Returns:
- the number of total pages.
-
getData
The data of current page- Returns:
- non-null
List
-
getDataSize
default int getDataSize()The size ofdata- Returns:
- positive integer
-
hasNext
boolean hasNext()It indicates has next page or not- Returns:
- if has , return
true, orfalse
-
hasData
default boolean hasData()Returns whether the page has data at all.- Returns:
-