org.shiftone.exq
Interface Cursor

All Superinterfaces:
java.util.Map
All Known Implementing Classes:
CursorImpl

public interface Cursor
extends java.util.Map

Interface Cursor

Author:
Jeff Drost

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Method Summary
 int getColumnCount()
          Returns the number of columns returned from the database for this query.
 int getColumnIndex(java.lang.String name)
          Returns the zero based index of the column.
 java.lang.String getColumnName(int index)
          Returns the name of the column for the given zero based column index.
 java.lang.Class getColumnType(int index)
          Returns the java class tyep of the data in the column for the given zero based column index.
 int getPageCount()
          Returns the number of other pages that resulted from the execution of this query.
 int getPageNumber()
          Returns a zero based index indicating which page this cursor is a view of.
 int getRowCount()
          Returns the number of rows avalible in this cursor.
 int getRowNumber()
          Returns the current zero based row index.
 java.lang.Object getValue(int columnIndex)
          Retrieves the value of the designated column in the current row of this cursor.
 java.lang.Object getValue(java.lang.String columnName)
          Retrieves the value of the named column in the current row of this cursor.
 boolean next()
          Moves the cursor down one row from its current position.
 void reset()
          Moves the current row to the first row
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

next

public boolean next()
Moves the cursor down one row from its current position. A cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.

Returns: true if the new current row is valid; false if there are no more rows


reset

public void reset()
Moves the current row to the first row


getPageCount

public int getPageCount()
Returns the number of other pages that resulted from the execution of this query.


getPageNumber

public int getPageNumber()
Returns a zero based index indicating which page this cursor is a view of.


getRowCount

public int getRowCount()
Returns the number of rows avalible in this cursor. If more than a page worth of rows was returned from the database, this value will only count rows in the current page.


getColumnCount

public int getColumnCount()
Returns the number of columns returned from the database for this query.


getColumnName

public java.lang.String getColumnName(int index)
Returns the name of the column for the given zero based column index.


getColumnType

public java.lang.Class getColumnType(int index)
Returns the java class tyep of the data in the column for the given zero based column index.


getColumnIndex

public int getColumnIndex(java.lang.String name)
Returns the zero based index of the column.


getRowNumber

public int getRowNumber()
Returns the current zero based row index.


getValue

public java.lang.Object getValue(java.lang.String columnName)
Retrieves the value of the named column in the current row of this cursor.
This method returns the same value as the get() method from the map interface that this interface extends. The get() method converts the key parameter to a String and calls this method. Use this method where possible to avoid unnecessary casting.


getValue

public java.lang.Object getValue(int columnIndex)
Retrieves the value of the designated column in the current row of this cursor. This index is zero based.