1 /* 2 * Copyright Openmind http://www.openmindonline.it 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package it.openutils.spring.rmibernate.client.pagination; 18 19 /** 20 * @author mmolaschi 21 * @version $Id: Paginator.java 716 2008-03-03 14:35:57Z fcarone $ 22 */ 23 public class Paginator 24 { 25 26 private int from; 27 28 private int size; 29 30 /** 31 * 32 */ 33 public Paginator() 34 { 35 36 } 37 38 /** 39 * @param from starting row number 40 * @param size max rows 41 */ 42 public Paginator(int from, int size) 43 { 44 this.from = from; 45 this.size = size; 46 } 47 48 /** 49 * Get starting row number 50 * @return starting row number 51 */ 52 public int getFrom() 53 { 54 return from; 55 } 56 57 /** 58 * Set starting row number 59 * @param from starting row number 60 */ 61 public void setFrom(int from) 62 { 63 this.from = from; 64 } 65 66 /** 67 * Get max number of rows 68 * @return max number of rows 69 */ 70 public int getSize() 71 { 72 return size; 73 } 74 75 /** 76 * Set max number of rows 77 * @param size max number of rows 78 */ 79 public void setSize(int size) 80 { 81 this.size = size; 82 } 83 84 }