T - 元数据类型S - 目标数据类型public class PaginationTemplate<T,S> extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
PaginationTemplate.DataHandler<T,S>
数据处理接口
|
| 构造器和说明 |
|---|
PaginationTemplate(Integer current,
Integer size,
Integer pages,
Long total,
Boolean hasNext,
Boolean hasPrevious) |
PaginationTemplate(Integer current,
Integer size,
Integer pages,
Long total,
Boolean hasNext,
Boolean hasPrevious,
List<S> data) |
PaginationTemplate(org.springframework.data.domain.Page<T> page,
PaginationTemplate.DataHandler<T,S> handler) |
| 限定符和类型 | 方法和说明 |
|---|---|
Integer |
getCurrent() |
List<S> |
getData() |
Boolean |
getHasNext() |
Boolean |
getHasPrevious() |
Integer |
getPages() |
Integer |
getSize() |
Long |
getTotal() |
PaginationTemplate<T,S> |
handle(List<T> d,
PaginationTemplate.DataHandler<T,S> handler)
处理数据
|
void |
setCurrent(Integer current) |
void |
setData(List<S> data) |
void |
setHasNext(Boolean hasNext) |
void |
setHasPrevious(Boolean hasPrevious) |
void |
setPages(Integer pages) |
void |
setSize(Integer size) |
void |
setTotal(Long total) |
public PaginationTemplate(org.springframework.data.domain.Page<T> page, PaginationTemplate.DataHandler<T,S> handler)
public PaginationTemplate(Integer current, Integer size, Integer pages, Long total, Boolean hasNext, Boolean hasPrevious)
public PaginationTemplate<T,S> handle(List<T> d, PaginationTemplate.DataHandler<T,S> handler)
d - 数据handler - 处理器public Integer getCurrent()
public void setCurrent(Integer current)
public Integer getSize()
public void setSize(Integer size)
public Integer getPages()
public void setPages(Integer pages)
public Long getTotal()
public void setTotal(Long total)
public Boolean getHasNext()
public void setHasNext(Boolean hasNext)
public Boolean getHasPrevious()
public void setHasPrevious(Boolean hasPrevious)
Copyright © 2024. All rights reserved.