001/*
002 * (C) Copyright 2006-2016 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     matic
018 */
019package org.nuxeo.ecm.automation.client.model;
020
021import java.util.List;
022
023/**
024 * @author matic
025 */
026public class PaginableDocuments extends Documents {
027
028    private static final long serialVersionUID = 1L;
029
030    protected int pageSize;
031
032    protected int currentPageIndex;
033
034    protected int numberOfPages;
035
036    protected int resultsCount;
037
038    public PaginableDocuments() {
039    }
040
041    public PaginableDocuments(List<Document> docs, int resultsCount, int pageSize, int numberOfPages,
042            int currentPageIndex) {
043        super(docs);
044        this.resultsCount = resultsCount;
045        this.pageSize = pageSize;
046        this.numberOfPages = numberOfPages;
047        this.currentPageIndex = currentPageIndex;
048    }
049
050    public int getPageSize() {
051        return pageSize;
052    }
053
054    public void setPageSize(int pageSize) {
055        this.pageSize = pageSize;
056    }
057
058    public int getCurrentPageIndex() {
059        return currentPageIndex;
060    }
061
062    public void setCurrentPageIndex(int currentPageIndex) {
063        this.currentPageIndex = currentPageIndex;
064    }
065
066    public int getNumberOfPages() {
067        return numberOfPages;
068    }
069
070    public void setNumberOfPages(int numberOfPages) {
071        this.numberOfPages = numberOfPages;
072    }
073
074    public int getResultsCount() {
075        return resultsCount;
076    }
077
078    public void setResultsCount(int resultsCount) {
079        this.resultsCount = resultsCount;
080    }
081}