planetj.database.report
Class ReportBreakCollection

java.lang.Object
  extended byplanetj.database.report.ReportBreakCollection
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class ReportBreakCollection
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

A grouping of ReportBreaks. Each SQLContext whose query uses report breaks get its own separate copy of its operation's ReportBreakCollection. These ReportBreak objects are used during the population of the RowCollection to generate ReportBreakRows in the RC. The same ReportBreak objects may also used by future (i.e. "next") RCs to help generate ReportBreakRows for those RCs.

See Also:
Serialized Form

Constructor Summary
ReportBreakCollection()
          ReportBreakCollection constructor
 
Method Summary
 ReportBreak addNewReportBreak(ReportPropertyGroup prpg, java.lang.String pColumnFunctionToken, java.lang.String pBreakColumnName)
          Creates a new ReportBreak and adds it to this ReportBreakCollection.
 ReportBreak addNewReportBreak(java.lang.String pColumnFunctionToken, java.util.List pFieldNames, java.lang.String pBreakColumnName, boolean pAddOverall)
          Deprecated. Use the version which takes in a ReportBreakPropertyGroup instead
 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.
protected  void addReportBreakInternal(ReportBreak pRB)
          Adds a ReportBreak to this ReportBreakCollection
protected  void addReportBreakInternal(ReportBreak pRB, int pIndex)
          Adds a ReportBreak to this ReportBreakCollection at the specified index
 java.lang.Object clone()
          Clones this ReportBreakCollection
 ReportBreakCollection cloneReportBreakCollection()
          Clones this ReportBreakCollection
static ReportBreakCollection createReportBreakCollection(PropertyGroupList pProperties)
          Creates a new ReportBreakCollection from a PropertyGroupList containing properties which specify a ReportBreakCollection.
 boolean equals(java.lang.Object o)
          Tests if this ReportBreakCollection and another ReportBreakCollection contain equivalent report breaks
 java.util.List getReportBreaks()
          Gets the unmodifiable List of ReportBreaks.
protected  java.util.List getReportBreaksInternal()
          Gets the 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
protected  void initialize(ReportBreakCollection rbc)
          Initializes the ReportBreaks in this collection from the ReportBreaks which are passed in.
 java.util.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
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportBreakCollection

public ReportBreakCollection()
ReportBreakCollection constructor

Method Detail

addNewReportBreak

public ReportBreak addNewReportBreak(java.lang.String pColumnFunctionToken,
                                     java.util.List pFieldNames,
                                     java.lang.String pBreakColumnName,
                                     boolean pAddOverall)
                              throws DataEngineException
Deprecated. Use the version which takes in a ReportBreakPropertyGroup instead

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
Throws:
DataEngineException

addNewReportBreak

public ReportBreak addNewReportBreak(ReportPropertyGroup prpg,
                                     java.lang.String pColumnFunctionToken,
                                     java.lang.String pBreakColumnName)
                              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
pBreakColumnName - The name of the column which will be monitored for breaks, or null if the ReportBreak should be an OverallReportBreak
Returns:
The newly created ReportBreak
Throws:
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

addReportBreakInternal

protected void addReportBreakInternal(ReportBreak pRB)
Adds a ReportBreak to this ReportBreakCollection


addReportBreakInternal

protected void addReportBreakInternal(ReportBreak pRB,
                                      int pIndex)
Adds a ReportBreak to this ReportBreakCollection at the specified index

Parameters:
pRB - The ReportBreak to add
pIndex - The index to add the report break at. If this ReportBreakCollection contains X ReportBreaks then a ReportBreak can only be added at indices 0 through X (inclusive)

clone

public java.lang.Object clone()
Clones this ReportBreakCollection


cloneReportBreakCollection

public ReportBreakCollection cloneReportBreakCollection()
Clones this ReportBreakCollection


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

Throws:
DataEngineException

equals

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


getReportBreaks

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


getReportBreaksInternal

protected java.util.List getReportBreaksInternal()
Gets the 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


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


initialize

protected void initialize(ReportBreakCollection rbc)
                   throws CMException
Initializes the ReportBreaks in this collection from the ReportBreaks which are passed in. The ReportBreakCollection which is passed as an argument must be compatible with this ReportBreakCollection

Throws:
CMException

iterator

public java.util.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