Pagevo Tool Class

Source: Internet
Author: User

Importjava.util.Date;Importjava.util.List; Public classPagevo<t> {    PrivateInteger code = 200;//Interface Status Code//Current Page    PrivateInteger currentpage = 1; //total number of bars displayed per page    PrivateInteger pageSize = 10; //total number of bars    PrivateInteger Totalnum; //do you have the next page ?    PrivateInteger Ismore; //Total Pages    PrivateInteger Totalpage; //Start Index    PrivateInteger StartIndex; //pagination Results    PrivateList<t>items;  PublicPagevo () {Super(); }     PublicPagevo (integer currentpage, integer pageSize, integer totalnum) {Super(); if(CurrentPage! =NULL&& currentpage > 0) {             This. currentpage =currentpage; }        if(PageSize! =NULL&& pageSize > 0) {             This. pageSize =pageSize; }         This. Totalnum =Totalnum;  This. Totalpage = ( This. Totalnum + This. pageSize-1)/ This. pageSize;  This. StartIndex = ( This. currentPage-1) * This. pageSize;  This. Ismore = This. currentpage >= This. totalpage? 0:1; }     PublicInteger getcurrentpage () {returncurrentpage; }     Public voidsetcurrentpage (Integer currentpage) { This. currentpage =currentpage; }     PublicInteger getpagesize () {returnpageSize; }     Public voidsetpagesize (Integer pageSize) { This. pageSize =pageSize; }     PublicInteger Gettotalnum () {returnTotalnum; }     Public voidsettotalnum (Integer totalnum) { This. Totalnum =Totalnum; }     PublicInteger Getismore () {returnIsmore; }     Public voidSetismore (Integer ismore) { This. Ismore =Ismore; }     PublicInteger gettotalpage () {returnTotalpage; }     Public voidsettotalpage (Integer totalpage) { This. Totalpage =Totalpage; }     PublicInteger Getstartindex () {returnStartIndex; }     Public voidSetstartindex (Integer startIndex) { This. StartIndex =StartIndex; }     PublicList<t>GetItems () {returnitems; }     Public voidSetitems (list<t>items) {         This. Items =items; }     PublicInteger GetCode () {returnCode; }     Public voidSetcode (Integer code) { This. Code =Code; }}

Pagevo Tool Class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.