Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javatools/db/DbIterator.java


1   /*
2       Javatools (modified version) - Some useful general classes.
3       Copyright (C) 2002-2003  Chris Bitmead (original) Antonio Petrelli (modified)
4   
5       This program is free software; you can redistribute it and/or modify
6       it under the terms of the GNU General Public License as published by
7       the Free Software Foundation; either version 2 of the License, or
8       (at your option) any later version.
9   
10      This program is distributed in the hope that it will be useful,
11      but WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13      GNU General Public License for more details.
14  
15      You should have received a copy of the GNU General Public License
16      along with this program; if not, write to the Free Software
17      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  
19      Contact me at: brenmcguire@users.sourceforge.net
20   */
21  package javatools.db;
22  import java.util.*;
23  import java.sql.*;
24  /**
25   * An iterator interface for DbTables.
26   *
27   * @author Antonio Petrelli
28   * @version 0.2.0
29   *
30   */
31  
32  public interface DbIterator extends Iterator {
33  
34          /** Removes the current element.
35           */        
36    public void remove();
37  
38    /**
39           * Are there more rows to iterator through?
40           * @throws DbException If something goes wrong.
41           * @return <CODE>true</CODE>: there are still more rows;
42           * <CODE>false</CODE>: no there are not.
43           */
44    public boolean hasNextRow() throws DbException;
45  
46    /**
47           * Get the next DbRow in the table.
48           * @throws DbException If something goes wrong.
49           * @return The next row.
50           */
51    public DbRow nextRow() throws DbException;
52  }