org.keel.services.report
Class ReportData
java.lang.Object
org.keel.services.report.ReportData
- public class ReportData
- extends java.lang.Object
Basic class for storing data to be reported. Custom implementations can extend this as needed.
- Author:
- Michael Nash
| Method Summary |
void |
addRow(java.util.LinkedHashSet row)
Add a row of data to be part of the report. |
void |
addRows(java.util.LinkedHashSet rows)
Add an entire set of rows at once to the report data |
int |
getColCount()
Get the column count. |
java.util.Iterator |
getIterator()
Get an iterator over the row data |
int |
getRowCount()
Get the row count. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rowCount
private int rowCount
-
colCount
private int colCount
-
rows
private java.util.LinkedHashSet rows
-
ReportData
public ReportData()
addRow
public void addRow(java.util.LinkedHashSet row)
throws ReportException
-
Add a row of data to be part of the report.
-
- Parameters:
row - A LinkedHashSet of data items for a single row of data. The order is important: the column order must be correct for this report. The first row added determines the number of columns (based on the number of entries in the HashSet). Subsequent rows added must have the same number of columns.
- Throws:
ReportException - If the wrong number of columns is supplied in the set
addRows
public void addRows(java.util.LinkedHashSet rows)
throws ReportException
-
Add an entire set of rows at once to the report data
-
- Parameters:
rows - A LinkedHashSet containing other LinkedHashSets, each of which is a single row of data.
- Throws:
ReportException - If the top-level set does not contain LinkedHashSets
getIterator
public java.util.Iterator getIterator()
throws ReportException
-
Get an iterator over the row data
-
- Returns:
- A iterator returning a LinkedHashSet for each element
- Throws:
ReportException - If there are no rows
getColCount
public int getColCount()
-
Get the column count. It is the same for all rows in this data set
-
- Returns:
- The count of columns in this data set
getRowCount
public int getRowCount()
-
Get the row count.
-
- Returns:
- The count of rows in this data set
Please see keelframework.org for information about new Keel releases.