org.ujac.util.table
Interface Row

All Known Implementing Classes:
BaseRow, DataRow, GroupRow, HeaderRow

public interface Row

Name: Row
Description: An interface for table rows.

Author:
lauerc

Method Summary
 List asList()
          Gets the list of elements from this row.
 String formatValue(int columnIdx)
          Formats the given column's value for output.
 String formatValue(String columnName)
          Formats the given column's value for output.
 int getAlign(int columnIdx)
          Gets the alignment of the given field.
 int getAlign(String columnName)
          Gets the alignment of the given field.
 boolean getBoolean(int columnIdx)
          Gets the boolean value from the given row.
 boolean getBoolean(String columnName)
          Gets the boolean value from the given row.
 Date getDate(int columnIdx)
          Gets the Date value from the given row.
 Date getDate(String columnName)
          Gets the Date value from the given row.
 double getDouble(int columnIdx)
          Gets the double value from the given row.
 double getDouble(String columnName)
          Gets the double value from the given row.
 float getFloat(int columnIdx)
          Gets the float value from the given row.
 float getFloat(String columnName)
          Gets the float value from the given row.
 Format getFormat(int columnIdx)
          Gets the format of the given field.
 Format getFormat(String columnName)
          Gets the format of the given field.
 int getIndex()
          Gets the colum index.
 int getInt(int columnIdx)
          Gets the integer value from the given row.
 int getInt(String columnName)
          Gets the int value from the given row.
 long getLong(int columnIdx)
          Gets the long value from the given row.
 long getLong(String columnName)
          Gets the long value from the given row.
 Object getObject(int columnIdx)
          Gets the Object value from the given row.
 Object getObject(String columnName)
          Gets the Object value from the given row.
 String getString(int columnIdx)
          Gets the String value from the given row.
 String getString(String columnName)
          Gets the String value from the given row.
 Table getTable()
          Gets the table which holds this row.
 Date getTime(int columnIdx)
          Gets the Time value from the given row.
 Date getTime(String columnName)
          Gets the Time value from the given row.
 Date getTimestamp(int columnIdx)
          Gets the Timestamp value from the given row.
 Date getTimestamp(String columnName)
          Gets the Timestamp value from the given row.
 String getType()
          Gets the row type.
 boolean isEndsBlock()
          Tells whether or not this row ends the current row block.
 boolean isStartNewPage()
          Tells whether or not to start a new page before printing this row.
 boolean isStartsBlock()
          Tells whether or not this row starts a new row block.
 boolean isVisible(int columnIdx)
          Checks whether the given field is visible or not.
 boolean isVisible(String columnName)
          Checks whether the given field is visible or not.
 void setAlign(int columnIdx, int alignment)
          Sets the row specific alignment for the given field.
 void setAlign(String columnName, int alignment)
          Sets the row specific alignment for the given field.
 void setBoolean(int columnIdx, boolean value)
          Sets the boolean value at the given row.
 void setBoolean(String columnName, boolean value)
          Sets the boolean value at the given row.
 void setDate(int columnIdx, Date value)
          Sets the Date value at the given row.
 void setDate(String columnName, Date value)
          Sets the Date value at the given row.
 void setDouble(int columnIdx, double value)
          Sets the double value at the given row.
 void setDouble(String columnName, double value)
          Sets the double value at the given row.
 void setEndsBlock(boolean endsBlock)
          Sets the endsBlock flag.
 void setFloat(int columnIdx, float value)
          Sets the float value at the given row.
 void setFloat(String columnName, float value)
          Sets the float value at the given row.
 void setFormat(int columnIdx, Format format)
          Sets the row specific format for the given field.
 void setFormat(String columnName, Format format)
          Sets the row specific format for the given field.
 void setInt(int columnIdx, int value)
          Sets the integer value at the given row.
 void setInt(String columnName, int value)
          Sets the int value at the given row.
 void setLong(int columnIdx, long value)
          Sets the long value at the given row.
 void setLong(String columnName, long value)
          Sets the long value at the given row.
 void setObject(int columnIdx, Object value)
          Sets the Object value at the given row.
 void setObject(String columnName, Object value)
          Sets the Object value at the given row.
 void setStartNewPage(boolean startNewPage)
          Sets the startNewPage flag.
 void setStartsBlock(boolean startsBlock)
          Sets the startsBlock flag.
 void setString(int columnIdx, String value)
          Sets the String value at the given row.
 void setString(String columnName, String value)
          Sets the String value at the given row.
 void setTime(int columnIdx, Date value)
          Sets the Time value at the given row.
 void setTime(String columnName, Date value)
          Sets the Time value at the given row.
 void setTimestamp(int columnIdx, Date value)
          Sets the Timestamp value at the given row.
 void setTimestamp(String columnName, Date value)
          Sets the Timestamp value at the given row.
 void setVisible(int columnIdx, boolean visible)
          Sets the visibility flag for the given field.
 void setVisible(String columnName, boolean visible)
          Sets the visibility flag for the given field.
 

Method Detail

getType

String getType()
Gets the row type.

Returns:
The row type.

getTable

Table getTable()
Gets the table which holds this row.

Returns:
The table that contains this row.

asList

List asList()
Gets the list of elements from this row.

Returns:
The row data as a List.

getIndex

int getIndex()
Gets the colum index.

Returns:
The column index.

getString

String getString(String columnName)
                 throws ColumnNotDefinedException,
                        TypeMismatchException
Gets the String value from the given row.

Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getString

String getString(int columnIdx)
                 throws ColumnNotDefinedException,
                        TypeMismatchException
Gets the String value from the given row.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setString

void setString(String columnName,
               String value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Sets the String value at the given row.

Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the date conversion failed.

setString

void setString(int columnIdx,
               String value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Sets the String value at the given row.

Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getInt

int getInt(String columnName)
           throws ColumnNotDefinedException,
                  TypeMismatchException
Gets the int value from the given row.

Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getInt

int getInt(int columnIdx)
           throws ColumnNotDefinedException,
                  TypeMismatchException
Gets the integer value from the given row.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setInt

void setInt(String columnName,
            int value)
            throws ColumnNotDefinedException,
                   TypeMismatchException
Sets the int value at the given row.

Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setInt

void setInt(int columnIdx,
            int value)
            throws ColumnNotDefinedException,
                   TypeMismatchException
Sets the integer value at the given row.

Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getLong

long getLong(String columnName)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Gets the long value from the given row.

Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getLong

long getLong(int columnIdx)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Gets the long value from the given row.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setLong

void setLong(String columnName,
             long value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Sets the long value at the given row.

Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setLong

void setLong(int columnIdx,
             long value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Sets the long value at the given row.

Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getFloat

float getFloat(int columnIdx)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Gets the float value from the given row.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.

getFloat

float getFloat(String columnName)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Gets the float value from the given row.

Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.

setFloat

void setFloat(int columnIdx,
              float value)
              throws ColumnNotDefinedException,
                     TypeMismatchException
Sets the float value at the given row.

Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.

setFloat

void setFloat(String columnName,
              float value)
              throws ColumnNotDefinedException,
                     TypeMismatchException
Sets the float value at the given row.

Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.

getDouble

double getDouble(String columnName)
                 throws ColumnNotDefinedException,
                        TypeMismatchException
Gets the double value from the given row.

Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getDouble

double getDouble(int columnIdx)
                 throws ColumnNotDefinedException,
                        TypeMismatchException
Gets the double value from the given row.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setDouble

void setDouble(String columnName,
               double value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Sets the double value at the given row.

Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setDouble

void setDouble(int columnIdx,
               double value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Sets the double value at the given row.

Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getBoolean

boolean getBoolean(String columnName)
                   throws ColumnNotDefinedException,
                          TypeMismatchException
Gets the boolean value from the given row.

Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getBoolean

boolean getBoolean(int columnIdx)
                   throws ColumnNotDefinedException,
                          TypeMismatchException
Gets the boolean value from the given row.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setBoolean

void setBoolean(String columnName,
                boolean value)
                throws ColumnNotDefinedException,
                       TypeMismatchException
Sets the boolean value at the given row.

Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setBoolean

void setBoolean(int columnIdx,
                boolean value)
                throws ColumnNotDefinedException,
                       TypeMismatchException
Sets the boolean value at the given row.

Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getDate

Date getDate(String columnName)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Gets the Date value from the given row.

Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getDate

Date getDate(int columnIdx)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Gets the Date value from the given row.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setDate

void setDate(String columnName,
             Date value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Sets the Date value at the given row.

Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setDate

void setDate(int columnIdx,
             Date value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Sets the Date value at the given row.

Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getTime

Date getTime(String columnName)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Gets the Time value from the given row.

Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getTime

Date getTime(int columnIdx)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Gets the Time value from the given row.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setTime

void setTime(String columnName,
             Date value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Sets the Time value at the given row.

Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setTime

void setTime(int columnIdx,
             Date value)
             throws ColumnNotDefinedException,
                    TypeMismatchException
Sets the Time value at the given row.

Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getTimestamp

Date getTimestamp(String columnName)
                  throws ColumnNotDefinedException,
                         TypeMismatchException
Gets the Timestamp value from the given row.

Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getTimestamp

Date getTimestamp(int columnIdx)
                  throws ColumnNotDefinedException,
                         TypeMismatchException
Gets the Timestamp value from the given row.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setTimestamp

void setTimestamp(String columnName,
                  Date value)
                  throws ColumnNotDefinedException,
                         TypeMismatchException
Sets the Timestamp value at the given row.

Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setTimestamp

void setTimestamp(int columnIdx,
                  Date value)
                  throws ColumnNotDefinedException,
                         TypeMismatchException
Sets the Timestamp value at the given row.

Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

getObject

Object getObject(String columnName)
                 throws ColumnNotDefinedException
Gets the Object value from the given row.

Parameters:
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

getObject

Object getObject(int columnIdx)
                 throws ColumnNotDefinedException
Gets the Object value from the given row.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

setObject

void setObject(String columnName,
               Object value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Sets the Object value at the given row.

Parameters:
columnName - The name of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

setObject

void setObject(int columnIdx,
               Object value)
               throws ColumnNotDefinedException,
                      TypeMismatchException
Sets the Object value at the given row.

Parameters:
columnIdx - The index of the desired column.
value - The new value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

formatValue

String formatValue(String columnName)
                   throws ColumnNotDefinedException,
                          TypeMismatchException
Formats the given column's value for output.

Parameters:
columnName - The name of the desired column.
Returns:
The formatted value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

formatValue

String formatValue(int columnIdx)
                   throws ColumnNotDefinedException,
                          TypeMismatchException
Formats the given column's value for output.

Parameters:
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the data conversion failed.

isVisible

boolean isVisible(String columnName)
                  throws ColumnNotDefinedException
Checks whether the given field is visible or not.

Parameters:
columnName - The name of the desired column.
Returns:
The visibility flag.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

isVisible

boolean isVisible(int columnIdx)
                  throws ColumnNotDefinedException
Checks whether the given field is visible or not.

Parameters:
columnIdx - The index of the desired column.
Returns:
The visibility flag.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

setVisible

void setVisible(String columnName,
                boolean visible)
                throws ColumnNotDefinedException
Sets the visibility flag for the given field.

Parameters:
columnName - The name of the desired column.
visible - The visibility flag.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

setVisible

void setVisible(int columnIdx,
                boolean visible)
                throws ColumnNotDefinedException
Sets the visibility flag for the given field.

Parameters:
columnIdx - The index of the desired column.
visible - The visibility flag.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

getFormat

Format getFormat(String columnName)
                 throws ColumnNotDefinedException
Gets the format of the given field.

Parameters:
columnName - The name of the desired column.
Returns:
The field's format.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

getFormat

Format getFormat(int columnIdx)
                 throws ColumnNotDefinedException
Gets the format of the given field.

Parameters:
columnIdx - The index of the desired column.
Returns:
The field's format.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

setFormat

void setFormat(String columnName,
               Format format)
               throws ColumnNotDefinedException
Sets the row specific format for the given field.

Parameters:
columnName - The name of the desired column.
format - The format to set.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

setFormat

void setFormat(int columnIdx,
               Format format)
               throws ColumnNotDefinedException
Sets the row specific format for the given field.

Parameters:
columnIdx - The index of the desired column.
format - The format to set.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

getAlign

int getAlign(String columnName)
             throws ColumnNotDefinedException
Gets the alignment of the given field.

Parameters:
columnName - The name of the desired column.
Returns:
The field's alignment.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

getAlign

int getAlign(int columnIdx)
             throws ColumnNotDefinedException
Gets the alignment of the given field.

Parameters:
columnIdx - The index of the desired column.
Returns:
The field's alignment.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

setAlign

void setAlign(String columnName,
              int alignment)
              throws ColumnNotDefinedException
Sets the row specific alignment for the given field.

Parameters:
columnName - The name of the desired column.
alignment - The format to set.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

setAlign

void setAlign(int columnIdx,
              int alignment)
              throws ColumnNotDefinedException
Sets the row specific alignment for the given field.

Parameters:
columnIdx - The index of the desired column.
alignment - The format to set.
Throws:
ColumnNotDefinedException - In case the requested column does not exist.

isStartNewPage

boolean isStartNewPage()
Tells whether or not to start a new page before printing this row.

Returns:
true, if a page break is required here, else false.

setStartNewPage

void setStartNewPage(boolean startNewPage)
Sets the startNewPage flag.

Parameters:
startNewPage - The new value for the startNewPage attribute.

isStartsBlock

boolean isStartsBlock()
Tells whether or not this row starts a new row block.

Returns:
true, if this row starts a new row block, else false.

setStartsBlock

void setStartsBlock(boolean startsBlock)
Sets the startsBlock flag.

Parameters:
startsBlock - The new value for the startsBlock attribute.

isEndsBlock

boolean isEndsBlock()
Tells whether or not this row ends the current row block.

Returns:
true, if this row ends the current row block, else false.

setEndsBlock

void setEndsBlock(boolean endsBlock)
Sets the endsBlock flag.

Parameters:
endsBlock - The new value for the endsBlock attribute.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.