org.liquidsite.util.db
Class DatabaseResults.Row

java.lang.Object
  extended byorg.liquidsite.util.db.DatabaseResults.Row
Enclosing class:
DatabaseResults

public class DatabaseResults.Row
extends java.lang.Object

A database results row.


Method Summary
 java.lang.Object get(int column)
          Returns the row value in the specified column.
 java.lang.Object get(java.lang.String column)
          Returns the row value in the specified column.
 boolean getBoolean(int column)
          Returns the row boolean value in the specified column.
 boolean getBoolean(java.lang.String column)
          Returns the row boolean value in the specified column.
 int getColumnCount()
          Returns the number of columns in the row.
 java.util.Date getDate(int column)
          Returns the row date value in the specified column.
 java.util.Date getDate(java.lang.String column)
          Returns the row date value in the specified column.
 int getInt(int column)
          Returns the row integer value in the specified column.
 int getInt(java.lang.String column)
          Returns the row integer value in the specified column.
 long getLong(int column)
          Returns the row long value in the specified column.
 long getLong(java.lang.String column)
          Returns the row long value in the specified column.
 java.lang.String getString(int column)
          Returns the row string value in the specified column.
 java.lang.String getString(java.lang.String column)
          Returns the row string value in the specified column.
 
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 row.

Returns:
the number of columns in the row

get

public java.lang.Object get(int column)
                     throws DatabaseDataException
Returns the row value in the specified column.

Parameters:
column - the column number, 0 <= column < count
Returns:
the row value in the specified column, or null if the column contained a NULL value
Throws:
DatabaseDataException - if the column number was out of bounds

get

public java.lang.Object get(java.lang.String column)
                     throws DatabaseDataException
Returns the row value in the specified column.

Parameters:
column - the column name
Returns:
the row value in the specified column, or null if the column contained a NULL value
Throws:
DatabaseDataException - if the column name wasn't present in the results

getBoolean

public boolean getBoolean(int column)
                   throws DatabaseDataException
Returns the row boolean value in the specified column.

Parameters:
column - the column number, 0 <= column < count
Returns:
the row boolean value in the specified column, or false if the column contained a NULL value
Throws:
DatabaseDataException - if the column number was out of bounds, or if the value wasn't a boolean value

getBoolean

public boolean getBoolean(java.lang.String column)
                   throws DatabaseDataException
Returns the row boolean value in the specified column.

Parameters:
column - the column name
Returns:
the row boolean value in the specified column, or false if the column contained a NULL value
Throws:
DatabaseDataException - if the column name wasn't present in the results, or if the value wasn't a boolean value

getDate

public java.util.Date getDate(int column)
                       throws DatabaseDataException
Returns the row date value in the specified column.

Parameters:
column - the column number, 0 <= column < count
Returns:
the row date value in the specified column, or null if the column contained a NULL value
Throws:
DatabaseDataException - if the column number was out of bounds, or if the value wasn't a date value

getDate

public java.util.Date getDate(java.lang.String column)
                       throws DatabaseDataException
Returns the row date value in the specified column.

Parameters:
column - the column name
Returns:
the row date value in the specified column, or null if the column contained a NULL value
Throws:
DatabaseDataException - if the column name wasn't present in the results, or if the value wasn't a date value

getInt

public int getInt(int column)
           throws DatabaseDataException
Returns the row integer value in the specified column.

Parameters:
column - the column number, 0 <= column < count
Returns:
the row integer value in the specified column, or zero (0) if the column contained a NULL value
Throws:
DatabaseDataException - if the column number was out of bounds, or if the value wasn't an integer value

getInt

public int getInt(java.lang.String column)
           throws DatabaseDataException
Returns the row integer value in the specified column.

Parameters:
column - the column name
Returns:
the row integer value in the specified column, or zero (0) if the column contained a NULL value
Throws:
DatabaseDataException - if the column name wasn't present in the results, or if the value wasn't an integer value

getLong

public long getLong(int column)
             throws DatabaseDataException
Returns the row long value in the specified column.

Parameters:
column - the column number, 0 <= column < count
Returns:
the row long value in the specified column, or zero (0) if the column contained a NULL value
Throws:
DatabaseDataException - if the column number was out of bounds, or if the value wasn't a long value

getLong

public long getLong(java.lang.String column)
             throws DatabaseDataException
Returns the row long value in the specified column.

Parameters:
column - the column name
Returns:
the row long value in the specified column, or zero (0) if the column contained a NULL value
Throws:
DatabaseDataException - if the column name wasn't present in the results, or if the value wasn't a long value

getString

public java.lang.String getString(int column)
                           throws DatabaseDataException
Returns the row string value in the specified column.

Parameters:
column - the column number, 0 <= column < count
Returns:
the row string value in the specified column, or null if the column contained a NULL value
Throws:
DatabaseDataException - if the column number was out of bounds

getString

public java.lang.String getString(java.lang.String column)
                           throws DatabaseDataException
Returns the row string value in the specified column.

Parameters:
column - the column name
Returns:
the row string value in the specified column, or null if the column contained a NULL value
Throws:
DatabaseDataException - if the column name wasn't present in the results