SQLTuple version: 1.2.0.0

hep.aida.ref.sql
Class SQLTupleCursor

java.lang.Object
  extended by hep.aida.ref.sql.SQLTupleCursor
All Implemented Interfaces:
FTupleCursor

public class SQLTupleCursor
extends Object
implements FTupleCursor

SQLTupleCursor extends FTupleCursor with SQL backend.

 $Log: SQLTupleCursor.java,v $
 Revision 1.7  2007/05/23 16:38:44  hrivnac
 logical connections for Plotter; better UML

 Revision 1.6  2005/09/02 14:10:31  hrivnac
 moved to JAS3 0.8.2

 Revision 1.5  2004/10/29 22:27:25  hrivnac
 imports corrected

 Revision 1.4  2004/10/12 19:26:59  hrivnac
 MySQL Connector 3.0.14

 Revision 1.3  2004/05/22 15:12:59  hrivnac
 class id reformated

 Revision 1.2  2004/05/04 08:50:33  hrivnac
 can run with JAS3

 Revision 1.1  2004/05/03 19:22:30  hrivnac
 basic support for JAS3

 

Version:
$Id: SQLTupleCursor.java,v 1.7 2007/05/23 16:38:44 hrivnac Exp $
Author:
J.Hrivnac

Field Summary
private  boolean _closed
           
private  SQLTuple _tuple
           
private static Logger log
          Logging .
 
Constructor Summary
SQLTupleCursor(SQLTuple tuple)
          Create with reference to SQLTuple.
 
Method Summary
 void close()
          Close this cursor.
 boolean next()
          Step to the next row.
 int row()
          Give the current row number
 void setRow(int n)
          Step to a specific row.
 void skip(int rows)
          Skips rows.
 void start()
          Rewind the Cursor to before the first row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_tuple

private SQLTuple _tuple

_closed

private boolean _closed

log

private static Logger log
Logging .

Constructor Detail

SQLTupleCursor

public SQLTupleCursor(SQLTuple tuple)
Create with reference to SQLTuple.

Parameters:
tuple - The SQLTuple containing requested column.
Method Detail

row

public int row()
        throws IllegalStateException
Give the current row number

Specified by:
row in interface FTupleCursor
Returns:
The current row number, or -1 if before the first row.
Throws:
IllegalStateException

start

public void start()
           throws IllegalStateException
Rewind the Cursor to before the first row.

Specified by:
start in interface FTupleCursor
Throws:
IllegalStateException

next

public boolean next()
             throws IllegalStateException
Step to the next row.

Specified by:
next in interface FTupleCursor
Returns:
False if there are no more rows.
Throws:
IllegalStateException

skip

public void skip(int rows)
          throws IllegalStateException
Skips rows.

Specified by:
skip in interface FTupleCursor
Parameters:
rows - The number of rows to skip, greater than 0.
Throws:
IllegalStateException

setRow

public void setRow(int n)
            throws IllegalStateException
Step to a specific row.

Specified by:
setRow in interface FTupleCursor
Parameters:
n - The row to move to.
Throws:
IndexOutOfBoundsException - if the index is < 0 or >= number of rows.
UnsupportedOperationException - if the Tuple does not support random access.
IllegalStateException

close

public void close()
Close this cursor. Any further attempts to use the cursor will result in an IllegalStateException.


Written by: J.Hrivnac

Documentation built November 9 2010 on Linux by hrivnac