|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--planetj.database.report.ReportBreak
Defines how and where reports should be generated for a RowCollection.
A report contains the results of an operation (such as a summation or average) on one or more columns in a group of Rows. These reports are contained in ReportBreakRows (a subclass of Row) and placed in the same RowCollection as the original Row objects.
ReportBreakRow objects are always located immediately after the group of Rows which were used to generate the contained report. This group of Rows may be a subset of the Rows returned by an SQL query, and it may include Rows from more than one RowCollection (in cases where the number of Rows returned by a query exceeds the number of Rows allowed in a RowCollection). The "break" where a ReportBreakRow is inserted is specified by the BreakColumn property - whenever two adjacent Rows contain different values in that column a report is generated and a ReportBreakRow is placed between those two Rows in the RowCollection.
ReportBreaks are intended to be used in conjunction with the ORDER BY sql clause. The ORDER BY clause will sort Rows by a specific column or columns, and then reports can be generated for each group of values that was ordered.
To create a ReportBreak, use the
ReportBreakCollection.addNewReportBreak()
method. Once created the properties of a ReportBreak
cannot be altered.
Constructor Summary | |
ReportBreak(ReportBreakCollection prbc,
String pColumnFunctionToken,
List pFieldNames,
String pBreakColumnName)
ReportBreak constructor |
Method Summary | |
boolean |
equals(Object o)
Tests if this ReportBreak is equal to another ReportBreak. |
String |
getBreakColumn()
Gets the name of the column which this ReportBreak will monitor for breaks. |
String |
getColumnFunctionToken()
Gets the column function token representing the function that will be used to generate this ReportBreak's reports |
List |
getFieldNames()
Gets the List of field names identifying the columns which will be used by this ReportBreak for generating ReportBreakRows. |
int |
getIndex()
Gets the index of this ReportBreak. |
Object |
getLastValue()
Gets the last value of the field which is being monitored for breaks |
OverallReportBreak |
getOverallReportBreak()
If an OverallReportBreak with the same field descriptors and column function was created when this ReportBreak was created, then that OverallReportBreak is returned. |
ReportBreakCollection |
getReportBreakCollection()
Gets the ReportBreakCollection which contains this ReportBreak |
List |
getRows()
Gets a List of the ReportBreakRows which have been generated by this ReportBreak |
int |
hashCode()
Returns a hashCode for this ReportBreak. |
boolean |
isOverallReportBreak()
This is not an OverallReportBreak |
ReportBreakRow |
processRow(Row pRow,
RowCollection pRC)
Passes a Row into to one or more column functions, and determines if a ReportBreakRow needs to be positioned prior to that Row |
void |
reset()
Clears all values from all of the column functions |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReportBreak(ReportBreakCollection prbc, String pColumnFunctionToken, List pFieldNames, String pBreakColumnName) throws DataEngineException
Method Detail |
public boolean equals(Object o)
equals
in class Object
public String getBreakColumn()
public String getColumnFunctionToken()
public List getFieldNames()
public int getIndex()
public Object getLastValue()
public OverallReportBreak getOverallReportBreak()
public ReportBreakCollection getReportBreakCollection()
public List getRows()
public int hashCode()
hashCode
in class Object
public boolean isOverallReportBreak()
public ReportBreakRow processRow(Row pRow, RowCollection pRC) throws CMException
pRow
- A Row that was just added to a RowCollection
pRow
, or
null if no such ReportBreakRow exists.
CMException
public void reset()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |