KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > commons > utils > ObjectPageList


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.commons.utils;
6
7 import java.util.List JavaDoc;
8 /**
9  * @author Tuan Nguyen (tuan08@users.sourceforge.net)
10  * @since Oct 21, 2004
11  * @version $Id: ObjectPageList.java,v 1.1 2004/10/22 14:18:46 tuan08 Exp $
12  */

13 public class ObjectPageList extends PageList {
14   
15   private List JavaDoc objects_ ;
16   
17   public ObjectPageList(List JavaDoc list, int pageSize) {
18     super(pageSize) ;
19     objects_ = list ;
20     setAvailablePage(list.size()) ;
21   }
22   
23   protected void populateCurrentPage(int page) throws Exception JavaDoc {
24     currentListPage_ = objects_.subList(getFrom(), getTo()) ;
25   }
26   
27   public List JavaDoc getAll() throws Exception JavaDoc { return objects_ ; }
28 }
29
Popular Tags