Flask接口签名sign原理与实例代码浅析
292
2022-12-17
Java返回分页结果集的封装代码实例
这篇文章主要介绍了java返回分页结果集的封装代码实例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
代码如下
package com.leyou.common;
import java.util.List;
public class PageResult private long total;//总条数 private Integer totalPage;//总页数 private List public PageResult() { } public PageResult(long total, List this.total = total; this.list = list; } public PageResult(long total, Integer totalPage, List this.total = total; this.totalPage = totalPage; this.list = list; } public long getTotal() { return total; } public void setTotal(long total) http://{ this.total = total; } public Integer getTotalPage() { return totalPage; } public void setTotalPage(Integer totalPage) { this.totalPage = totalPage; } public List return list; } public void setList(List this.list = list; } } 结果
private long total;//总条数
private Integer totalPage;//总页数
private List
public PageResult() {
}
public PageResult(long total, List
this.total = total;
this.list = list;
}
public PageResult(long total, Integer totalPage, List
this.total = total;
this.totalPage = totalPage;
this.list = list;
}
public long getTotal() {
return total;
}
public void setTotal(long total) http://{
this.total = total;
}
public Integer getTotalPage() {
return totalPage;
}
public void setTotalPage(Integer totalPage) {
this.totalPage = totalPage;
}
public List
return list;
}
public void setList(List this.list = list; } } 结果
this.list = list;
}
}
结果
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~