planetj.database.report
Class ReportBreakCollection

java.lang.Object
  |
  +--planetj.database.report.ReportBreakCollection
All Implemented Interfaces:
Serializable

public class ReportBreakCollection
extends Object
implements Serializable

A grouping of ReportBreaks

See Also:
Serialized Form

Constructor Summary
ReportBreakCollection()
          ReportBreakCollection constructor
 
Method Summary
 ReportBreak addNewReportBreak(String pColumnFunctionToken, List pFieldNames, String pBreakColumnName, boolean pAddOverall)
          Creates a new ReportBreak and adds it to this ReportBreakCollection.
 boolean addReportBreak(ReportBreak pRB)
          Adds a ReportBreak to this ReportBreakCollection, but only if it isn't already present.
 boolean addReportBreak(ReportBreak pRB, int pIndex)
          Adds a ReportBreak to this ReportBreakCollection at the specified index, but only if it isn't already present.
static ReportBreakCollection createReportBreakCollection(PropertyGroupList pProperties)
          Creates a new ReportBreakCollection from a PropertyGroupList containing properties which specify a ReportBreakCollection.
 boolean equals(Object o)
          Tests if this ReportBreakCollection and another ReportBreakCollection contain equivalent report breaks
 List getReportBreaks()
          Gets the unmodifiable List of ReportBreaks.
 int hashCode()
          Returns a hashCode for this ReportBreakCollection.
 int indexOf(ReportBreak pRB)
          Returns the index of the ReportBreak among *ALL* report breaks in this ReportBreakCollection, or -1 if the ReportBreak is not part of this ReportBreakCollection
 Iterator iterator()
          Returns an iterator over the ReportBreaks.
 void reset()
          Clears all values from all of the column functions
 int size()
          Returns the total number of ReportBreaks
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportBreakCollection

public ReportBreakCollection()
ReportBreakCollection constructor

Method Detail

addNewReportBreak

public ReportBreak addNewReportBreak(String pColumnFunctionToken,
                                     List pFieldNames,
                                     String pBreakColumnName,
                                     boolean pAddOverall)
                              throws DataEngineException
Creates a new ReportBreak and adds it to this ReportBreakCollection.

Parameters:
pColumnFunctionToken - One of the constants defined in the ColumnFuntionToken class indicating what column function the ReportBreak should use for its reports
pFieldNames - A List of field names indicating the columns for which reports should be generated
pBreakColumnName - The name of the column which will be monitored for breaks, or null if the ReportBreak should be an OverallReportBreak
pAddOverall - Whether or not an OverallReportBreak should also be generated and added with the same column function and field descriptors. This parameter is ignored if the ReportBreak being created is already an OverallReportBreak
Returns:
The newly created ReportBreak
DataEngineException

addReportBreak

public boolean addReportBreak(ReportBreak pRB)
Adds a ReportBreak to this ReportBreakCollection, but only if it isn't already present.

Parameters:
pRB - The ReportBreak to add
Returns:
Whether or not the ReportBreak was added

addReportBreak

public boolean addReportBreak(ReportBreak pRB,
                              int pIndex)
Adds a ReportBreak to this ReportBreakCollection at the specified index, but only if it isn't already present.

Parameters:
pRB - The ReportBreak to add
pIndex - The index to add the report break at. If this ReportBreakCollection contains X normal ReportBreaks, and Y OverallReportBreaks, then a normal ReportBreak can only be added at indices 0 to X and an OverallReportBreak can only be added at indices X to X + Y.
Returns:
Whether or not the ReportBreak was added

createReportBreakCollection

public static ReportBreakCollection createReportBreakCollection(PropertyGroupList pProperties)
                                                         throws DataEngineException
Creates a new ReportBreakCollection from a PropertyGroupList containing properties which specify a ReportBreakCollection. If the PropertyGroupList does not contain any properties which specify a report break, null is returned

DataEngineException

equals

public boolean equals(Object o)
Tests if this ReportBreakCollection and another ReportBreakCollection contain equivalent report breaks

Overrides:
equals in class Object

getReportBreaks

public List getReportBreaks()
Gets the unmodifiable List of ReportBreaks.


hashCode

public int hashCode()
Returns a hashCode for this ReportBreakCollection. The current state of the column functions of the ReportBreaks are not taken into account in the hashCode

Overrides:
hashCode in class Object

indexOf

public int indexOf(ReportBreak pRB)
Returns the index of the ReportBreak among *ALL* report breaks in this ReportBreakCollection, or -1 if the ReportBreak is not part of this ReportBreakCollection


iterator

public Iterator iterator()
Returns an iterator over the ReportBreaks.


reset

public void reset()
Clears all values from all of the column functions


size

public int size()
Returns the total number of ReportBreaks