org.liquidsite.util.db
Class DatabaseResults

java.lang.Object
  extended byorg.liquidsite.util.db.DatabaseResults

public class DatabaseResults
extends java.lang.Object

A database result container.


Nested Class Summary
 class DatabaseResults.Row
          A database results row.
 
Method Summary
 int getColumnCount()
          Returns the number of columns in the result.
 int getColumnPosition(java.lang.String name)
          Returns the column position, starting from zero (0).
 DatabaseResults.Row getRow(int row)
          Returns a specified row in the result.
 int getRowCount()
          Returns the number of rows in the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getColumnCount

public int getColumnCount()
Returns the number of columns in the result.

Returns:
the number of columns in the result

getColumnPosition

public int getColumnPosition(java.lang.String name)
Returns the column position, starting from zero (0).

Parameters:
name - the column name
Returns:
the column position, or -1 if the column name wasn't recognized

getRowCount

public int getRowCount()
Returns the number of rows in the result.

Returns:
the number of rows in the result

getRow

public DatabaseResults.Row getRow(int row)
                           throws DatabaseDataException
Returns a specified row in the result.

Parameters:
row - the row number
Returns:
the database result row, or null if no such row exists
Throws:
DatabaseDataException - if the row number was out of bounds