1 /*** 2 * The contents of this file are subject to the Mozilla Public 3 * License Version 1.1 (the "License"); you may not use this file 4 * except in compliance with the License. You may obtain a copy of 5 * the License at http://www.mozilla.org/MPL/ 6 * 7 * Software distributed under the License is distributed on an "AS 8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 * implied. See the License for the specific language governing 10 * rights and limitations under the License. 11 * 12 * The Original Code is pow2toolkit library. 13 * 14 * The Initial Owner of the Original Code is 15 * Claudio Fratarcangeli 16 * 17 * Portions created by Power Of Two S.R.L. are 18 * Copyright (C) Power Of Two S.R.L. 19 * All Rights Reserved. 20 * 21 * Contributor(s): 22 */ 23 24 package com.pow2.dao.datalist; 25 26 27 28 /*** 29 * DataListHandler Interface. 30 * <br> 31 * This interface is used by a client application to retrieve a subset of 32 * the query result set. 33 * 34 * @author Claudio Fratarcangeli 35 * @created 5 dicembre 2002 36 */ 37 public interface DataListHandler 38 { 39 /*** 40 * Get the entire data list. 41 * 42 * @return the entire data list 43 * @throws Exception if any error occurs 44 */ 45 public DataList getList() throws Exception; 46 47 48 /*** 49 * Gets a subset of the query result set. 50 * 51 * @param startIndex start index 52 * @param count number of records to fetch 53 * @return a subset of the query result set 54 * @exception Exception if any error occurs 55 */ 56 public DataList getListChunk(int startIndex, int count) throws Exception; 57 58 59 /*** 60 * Check if the element at the input position exists. 61 * 62 * @param index the index position value 63 * @return true if the element at the input position exists, false otherwise 64 * @exception Exception if any error occurs 65 */ 66 public boolean elementExists(int index) throws Exception; 67 68 69 /*** 70 * Close this handler. 71 * 72 * @exception Exception if any error occurs 73 */ 74 public void close() throws Exception; 75 }