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 * ResultSetDataList interface. 30 * <br> 31 * This interface implies the concept of cursor and a corresponding 32 * current row for the underlying collection. 33 * 34 * @author Claudio Fratarcangeli 35 * @created 5 dicembre 2002 36 */ 37 public interface ResultSetDataList extends DataList 38 { 39 /*** 40 * Check if there exists a row after the current row. 41 * 42 * @return true if a row exists, false otherwise 43 * @exception Exception if any error occurs 44 */ 45 public boolean hasNext() throws Exception; 46 47 48 /*** 49 * Move the resultSet cursor before the first row of the list. 50 * 51 * @exception Exception if any error occurs 52 */ 53 public void beforeFirst() throws Exception; 54 55 56 /*** 57 * Move the cursor to a specific absolute row number. 58 * Rows are numbered starting from 0. 59 * 60 * @param index the cursor index value 61 * @return true if the cursor is on the result set; false otherwise 62 * @exception Exception if any error occurs 63 */ 64 public boolean absolute(int index) throws Exception; 65 66 67 /*** 68 * Check if an element exists at the input <code>index</code> 69 * position. 70 * 71 * @param index the index value 72 * @return true if if an element exists at the input <code>index</code> 73 * position, false otherwise 74 * @exception Exception if any error occurs 75 */ 76 public boolean elementExists(int index) throws Exception; 77 }