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

Quick Search    Search Deep

com.mysql.jdbc
Interface RowData  view RowData download RowData.java

All Known Implementing Classes:
RowDataDynamic, RowDataStatic

public interface RowData

This interface abstracts away how row data is accessed by the result set. It is meant to allow a static implementation (Current version), and a streaming one.


Field Summary
static int RESULT_SET_SIZE_UNKNOWN
          What's returned for the size of a result set when its size can not be determined.
 
Method Summary
 void addRow(byte[][] row)
          Adds a row to this row data.
 void afterLast()
          Moves to after last.
 void beforeFirst()
          Moves to before first.
 void beforeLast()
          Moves to before last so next el is the last el.
 void close()
          We're done.
 byte[][] getAt(int index)
          Only works on non dynamic result sets.
 int getCurrentRowNumber()
          Returns the current position in the result set as a row number.
 ResultSet getOwner()
          Returns the result set that 'owns' this RowData
 boolean hasNext()
          Returns true if another row exsists.
 boolean isAfterLast()
          Returns true if we got the last element.
 boolean isBeforeFirst()
          Returns if iteration has not occured yet.
 boolean isDynamic()
          Returns true if the result set is dynamic.
 boolean isEmpty()
          Has no records.
 boolean isFirst()
          Are we on the first row of the result set?
 boolean isLast()
          Are we on the last row of the result set?
 void moveRowRelative(int rows)
          Moves the current position relative 'rows' from the current position.
 byte[][] next()
          Returns the next row.
 void removeRow(int index)
          Removes the row at the given index.
 void setCurrentRow(int rowNumber)
          Moves the current position in the result set to the given row number.
 void setOwner(ResultSet rs)
          Set the result set that 'owns' this RowData
 int size()
          Only works on non dynamic result sets.
 

Field Detail

RESULT_SET_SIZE_UNKNOWN

public static final int RESULT_SET_SIZE_UNKNOWN
What's returned for the size of a result set when its size can not be determined.

See Also:
Constant Field Values
Method Detail

isAfterLast

public boolean isAfterLast()
                    throws java.sql.SQLException
Returns true if we got the last element.


getAt

public byte[][] getAt(int index)
               throws java.sql.SQLException
Only works on non dynamic result sets.


isBeforeFirst

public boolean isBeforeFirst()
                      throws java.sql.SQLException
Returns if iteration has not occured yet.


setCurrentRow

public void setCurrentRow(int rowNumber)
                   throws java.sql.SQLException
Moves the current position in the result set to the given row number.


getCurrentRowNumber

public int getCurrentRowNumber()
                        throws java.sql.SQLException
Returns the current position in the result set as a row number.


isDynamic

public boolean isDynamic()
                  throws java.sql.SQLException
Returns true if the result set is dynamic. This means that move back and move forward won't work because we do not hold on to the records.


isEmpty

public boolean isEmpty()
                throws java.sql.SQLException
Has no records.


isFirst

public boolean isFirst()
                throws java.sql.SQLException
Are we on the first row of the result set?


isLast

public boolean isLast()
               throws java.sql.SQLException
Are we on the last row of the result set?


addRow

public void addRow(byte[][] row)
            throws java.sql.SQLException
Adds a row to this row data.


afterLast

public void afterLast()
               throws java.sql.SQLException
Moves to after last.


beforeFirst

public void beforeFirst()
                 throws java.sql.SQLException
Moves to before first.


beforeLast

public void beforeLast()
                throws java.sql.SQLException
Moves to before last so next el is the last el.


close

public void close()
           throws java.sql.SQLException
We're done.


hasNext

public boolean hasNext()
                throws java.sql.SQLException
Returns true if another row exsists.


moveRowRelative

public void moveRowRelative(int rows)
                     throws java.sql.SQLException
Moves the current position relative 'rows' from the current position.


next

public byte[][] next()
              throws java.sql.SQLException
Returns the next row.


removeRow

public void removeRow(int index)
               throws java.sql.SQLException
Removes the row at the given index.


size

public int size()
         throws java.sql.SQLException
Only works on non dynamic result sets.


setOwner

public void setOwner(ResultSet rs)
Set the result set that 'owns' this RowData


getOwner

public ResultSet getOwner()
Returns the result set that 'owns' this RowData