com.waveset.util
Class ReportTable

java.lang.Object
  extended bycom.waveset.util.ReportTable

public class ReportTable
extends java.lang.Object

A class that provides a convenient set of methods for minipulating tables in a report section.


Field Summary
static java.lang.String code_id
           
 
Constructor Summary
ReportTable()
           
 
Method Summary
 void addRow(java.util.ArrayList rowData)
          Add a row to this table.
 void addRow(java.lang.Object rowDataCol1)
          Adds a row to the table if the table only has a single column.
 void addRow(java.lang.Object rowDataCol1, java.lang.Object rowDataCol2)
          Adds a row to the table if the table only has a single column.
 java.util.ArrayList getColumnNames()
          Get the column names for this table.
 java.util.ArrayList getRows()
          Get the rows for this table.
 boolean isEmpty()
          Returns true if there aren't any rows in the table.
 void setColumnNames(java.util.ArrayList columns)
          Set the column names for this table.
 void setColumnNames(java.lang.Object col1)
          Set the column names if the table only has a single column.
 void setColumnNames(java.lang.Object col1, java.lang.Object col2)
          Set the column names if the table only has a two columns.
 void setRows(java.util.ArrayList rows)
          Set the rows for this table.
 java.lang.String toXml()
           
 java.lang.String toXml(java.lang.StringBuffer buf, int indent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

ReportTable

public ReportTable()
Method Detail

setColumnNames

public void setColumnNames(java.util.ArrayList columns)
Set the column names for this table.


getColumnNames

public java.util.ArrayList getColumnNames()
Get the column names for this table.


setColumnNames

public void setColumnNames(java.lang.Object col1)
Set the column names if the table only has a single column. Helper function to avoid caller creating an ArrayList.


setColumnNames

public void setColumnNames(java.lang.Object col1,
                           java.lang.Object col2)
Set the column names if the table only has a two columns. Helper function to avoid caller creating an ArrayList.


addRow

public void addRow(java.util.ArrayList rowData)
Add a row to this table. The row data should be an array list of data. Each column in a row will be represented as an array.


addRow

public void addRow(java.lang.Object rowDataCol1)
Adds a row to the table if the table only has a single column. Helper function to avoid caller creating an ArrayList.


addRow

public void addRow(java.lang.Object rowDataCol1,
                   java.lang.Object rowDataCol2)
Adds a row to the table if the table only has a single column. Helper function to avoid caller creating an ArrayList.


setRows

public void setRows(java.util.ArrayList rows)
Set the rows for this table.


getRows

public java.util.ArrayList getRows()
Get the rows for this table. Returns an ArrayList of ArrayList. Each element in the top level ArrayList represents a row and each row will contain the columns that makes up that row.


isEmpty

public boolean isEmpty()
Returns true if there aren't any rows in the table.


toXml

public java.lang.String toXml()

toXml

public java.lang.String toXml(java.lang.StringBuffer buf,
                              int indent)