planetj.database.report
Class ReportBreakRowCollection

java.lang.Object
  extended byplanetj.database.RowCollection
      extended byplanetj.database.report.ReportBreakRowCollection
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, IActionObject, IBatchProcessObject, IFDFObject, INavigationObject, IXMLObject, java.util.List, java.io.Serializable

public class ReportBreakRowCollection
extends RowCollection

A RowCollection which knows how to generate report breaks.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.RowCollection
RowCollection.LinkedRowCollection
 
Field Summary
 
Fields inherited from class planetj.database.RowCollection
className, FIRST_ROW, INSERT_ACTION, LAST_ROW, mReturnedFromCache, mRowEventListeners, UPDATE_ACTION
 
Constructor Summary
ReportBreakRowCollection()
          ReportRowCollection constructor comment.
 
Method Summary
 int addRows(int pFirstRow, int pRowCount, java.sql.ResultSet pRS)
          Adds rows from the results set to this RowCollection.
protected  int addRows(int pNumberOfRows, java.sql.ResultSet pRS)
          Adds rows from the results set to this RowCollection.
protected  void addRunningTotal(ReportBreakCollection reportBreaks)
          Stores the report breaks as the running totals for this page of the RC continuum
protected  java.util.List extractFieldDescriptors(java.util.List pFieldNames)
          Creates a List containing the field descriptors used for this RowCollection
 RowCollection getNextRowCollection(int pNumberOfRows)
          Gets a RowCollection containing another group of rows which satisfy the query that was used to create this RowCollection.
 RowCollection getPreviousRowCollection(int pNumberOfRows)
          WK (4/24/2002 9:16:11 AM): Need to reword javadoc, first row is now the number of records per page before the previous row - fixes bug when last row collection doesn't contain the complete number of pages Gets a RowCollection containing another group of rows which satisfy the query that was used to create this RowCollection.
 int getReportRowCount()
          Gets the number of ReportBreakRows currently contained in this ReportBreakRowCollection.
static int getReportRowCount(RowCollection rc)
          Gets the number of ReportBreakRows currently contained in the RowCollection.
protected  ReportBreakCollection getRunningTotal(int pageNumber)
          Gets the ReportBreakCollection containing the running totals for the specified page of this RC continuum
protected  void preprocessRow(Row pRow)
          Invoked after a new Row has been read from the DB and just before it's inserted into this RowCollection.
 RowCollection refresh()
          This method will refresh this RowCollection from the database and return this.
protected  void rowCollectionPopulated()
          Invoked after all Rows have been read from the DB and added to this RowCollection.
 
Methods inherited from class planetj.database.RowCollection
add, add, addAll, addAll, addFDRows, addRow, addRow, addRowEventListener, addTable, addToConnectedChildren, advanceRowCollection, batchProcess, clear, clearConnectedChildren, clearRows, clearTables, clearValidationExceptions, clone, cloneAttributes, cloneRowCollection, contains, contains, containsAll, containsRowWithFieldsEqualTo, convertRows, copyToConnection, copyToConnection, copyToConnection, createAction, createFieldDescriptor, createNamedActionRequest, createRowCollection, createRowCollection, createRowList, delete, delete, delete, delete, doesFieldDescriptorExist, exportToPDF, filter, filter, filter, firstRow, get, getActionDefaultLocation, getActionDescriptor, getActionRequest, getActionRequest, getActions, getActionsForOperation, getActionsForRow, getActionsForRowFields, getAllRemainingRows, getAttribute, getColumnCount, getColumnNames, getColumnValues, getColumnValues, getColumnValuesByUsageId, getCompleteRowCollection, getCompleteRowCollection, getConfigProperty, getConnectedChildren, getConnectedChildrenInternal, getContainedClass, getEstimatedSize, getExternalName, getExternalNames, getExternalNames, getFDFData, getFieldCount, getFieldDescriptor, getFieldDescriptorCollection, getFieldDescriptorCollection, getFieldDescriptors, getFieldDescriptorsWithUsage, getFieldDescriptorsWithUsageId, getFieldDescriptorWithUsageId, getFieldNames, getFieldNameSets, getFields, getFieldsToDisplay, getFieldsToDisplayStrict, getFieldsToDisplayStrict, getGraphableFieldNames, getJoinFieldNames, getJSPFor, getLastUpdated, getLibraryName, getMaxValue, getMetaDataSystemAlias, getNavigationKey, getNavigationListKey, getNextRowCollection, getOperation, getPageNumber, getPhysicalFieldNames, getPreviousRowCollection, getPropertyGroup, getPropertyGroups, getPropertyGroups, getResultSet, getRetrievedRowCount, getRow, getRowCollection, getRowCollectionHandledActionNames, getRowCount, getRows, getRowsInternal, getSelectedRowCollection, getSortedColumnNames, getSortedColumnNamesAscending, getSQL, getSQLContext, getSQLContextMaxRowsPerPage, getSQLContextTotalRows, getSum, getSystemAlias, getTable, getTableName, getTables, getTimestamp, getTitle, getValidationExceptions, getValueAsDouble, getValueAsDouble, getXMLData, getXMLData, getXMLHeaderData, getXMLHeaderData, handleAction, hasConnectedChildren, hasNextRowCollection, hasPreviousRowCollection, indexOf, indexOf, insert, insert, insert, insert, insertBatch, insertBatchInternal, insertInternal, isActionApplicable, isActionsSameForAllRowFields, isActionsSameForAllRows, isARow, isARowCollection, isCloneNeeded, isCurrent, isEmpty, isFromCache, isFromGroupBy, isFromJoin, isGraphable, isHasColumnNames, isHasRowEventListners, isInCache, isLocked, isOkToReturnMeFromCache, isPersistent, isRefreshing, isRowCollectionContainEditableRow, isRowInsertable, isValidateRequired, iterator, join, lastIndexOf, lastRow, listIterator, listIterator, locateRowBasedOnNamedFieldValues, newRow, newRow, openFor, prepareFileDescriptor, prepareForCache, prepareForDisplay, prepareForResults, prepareForReturnFromCache, prepareFromFieldNames, preUpdateRow, processJoins, reconcile, reconcile, refreshIfNeeded, remove, remove, removeAll, removeAllRows, removeAttribute, removeFromConnectedChildren, removeNavigationKey, removeRow, removeRow, removeRow, removeRowBasedOnKeyValues, removeRowEventListener, removeTable, replaceRow, replaceRowInConnectedChildren, resetDisplayValues, retainAll, rollbackChanges, rowAltered, rowCollectionCreated, set, setAttribute, setAutoUpdateFieldValues, setColumnValues, setContainedClass, setFieldDescriptors, setFieldNames, setFieldValuesWithCommonUsageIds, setInCache, setInsertSQLContext, setLastUpdated, setLocked, setNavigationKey, setPageNumber, setPersistent, setPropertyGroups, setRefreshing, setResultSet, setRetrievedRowCount, setReturnFromCache, setRow, setSortedColumnNames, setSql, setSQLContext, setSystemAlias, setTable, setTables, setTables, size, sort, sortInternal, subList, toArray, toArray, toCSV, toCSV, toDOC, toDOC, toFDF, toPDF, toString, toUpperCase, toXML, update, update, update, update, validate, validate, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

ReportBreakRowCollection

public ReportBreakRowCollection()
ReportRowCollection constructor comment.

Method Detail

addRows

public int addRows(int pFirstRow,
                   int pRowCount,
                   java.sql.ResultSet pRS)
            throws CMException
Adds rows from the results set to this RowCollection.

Overrides:
addRows in class RowCollection
Parameters:
pFirstRow - The row from the result set which will become row 1 of this RowCollection. The first row in the result is row number 1. There are two special constants that can be used for this argument: FIRST_ROW, and LAST_ROW. To add the first ten rows in the result set to this RowCollection you could invoke this method like this:

addRows (RowCollection.FIRST_ROW, 10, resultSet);

To add the last ten rows in the result set to this RowCollection you could invoke this method like this:

addRows (RowCollection.LAST_ROW - 10, 10, resultSet);

Note that using the LAST_ROW constant in this manner is only supported if the ResultSet allows backward and forward scrolling. Attempting to use the LAST_ROW constant when only forward scrolling is allowed causes an exception to be thrown.
pRowCount - The number of row from the ResultSet to try and add to this RowCollection. If the special constant SQLContext.NO_MAXIMUM is passed as this argument, then all the rows in the ResultSet (that aren't before the row indicated by the pFirstRow parameter) will be added to this RowCollection.
pRS - The result set from which rows will be added.
Returns:
The number of rows that were actually added to this RowCollection.
Throws:
CMException

addRows

protected int addRows(int pNumberOfRows,
                      java.sql.ResultSet pRS)
               throws CMException
Description copied from class: RowCollection
Adds rows from the results set to this RowCollection. The first row added is the current row of the result set. If the cursor is not positioned on a row, then no rows will be added.

Overrides:
addRows in class RowCollection
Parameters:
pNumberOfRows - The number of row to add. The constant SQLContext.ALL_ROWS may also be used.
pRS - The result set from which rows will be added.
Returns:
The number of rows that were actually added to this RowCollection.
Throws:
CMException

addRunningTotal

protected void addRunningTotal(ReportBreakCollection reportBreaks)
Stores the report breaks as the running totals for this page of the RC continuum


extractFieldDescriptors

protected java.util.List extractFieldDescriptors(java.util.List pFieldNames)
                                          throws CMException
Creates a List containing the field descriptors used for this RowCollection

Overrides:
extractFieldDescriptors in class RowCollection
Throws:
CMException

getNextRowCollection

public RowCollection getNextRowCollection(int pNumberOfRows)
                                   throws CMException
Description copied from class: RowCollection
Gets a RowCollection containing another group of rows which satisfy the query that was used to create this RowCollection. This method may result in an additional query to the database. If the last row in this RowCollection was row number X, then the first row in the returned RowCollection will be row X + 1. If rows in the database have been inserted/deleted/updated between the time this RowCollection was created and the invocation of this method, it is possible for rows to be duplicated (included in both this RowCollection and the returned RowCollection) or missing (included in neither).

Overrides:
getNextRowCollection in class RowCollection
Parameters:
pNumberOfRows - The number of rows the returned RowCollection should contain. The actual number of rows it contains may be less than this value (if there weren't enough rows in the database). If there are no "next rows" an empty RowCollection is returned. The hasNextRowCollection() method can be used to test for this case.
Throws:
CMException

getPreviousRowCollection

public RowCollection getPreviousRowCollection(int pNumberOfRows)
                                       throws CMException
Description copied from class: RowCollection
WK (4/24/2002 9:16:11 AM): Need to reword javadoc, first row is now the number of records per page before the previous row - fixes bug when last row collection doesn't contain the complete number of pages Gets a RowCollection containing another group of rows which satisfy the query that was used to create this RowCollection. This method may result in an additional query to the database. The returned RowCollection's first row will be pNumberOfRows before the first row of this RowCollection, except for cases where there aren't enough "previous rows". In those cases its first row will be the first row of the ResultSet. So if the first row of this RowCollection is the first row of the ResultSet, then the returned RowCollection may contain the same rows as this RowCollection. You can use the hasPreviousRowCollection() method to check for this case. If rows in the database have been inserted/deleted/updated between the time this RowCollection was created and the invocation of this method, it is possible for rows to be duplicated (included in both this RowCollection and the returned RowCollection) or missing (included in neither).

Overrides:
getPreviousRowCollection in class RowCollection
Parameters:
pNumberOfRows - The number of rows the returned RowCollection should contain; the actual number of contained rows might be fewer if there aren't enough rows in the table.
Throws:
CMException

getReportRowCount

public int getReportRowCount()
Gets the number of ReportBreakRows currently contained in this ReportBreakRowCollection.


getRunningTotal

protected ReportBreakCollection getRunningTotal(int pageNumber)
Gets the ReportBreakCollection containing the running totals for the specified page of this RC continuum


getReportRowCount

public static int getReportRowCount(RowCollection rc)
Gets the number of ReportBreakRows currently contained in the RowCollection.


preprocessRow

protected void preprocessRow(Row pRow)
Invoked after a new Row has been read from the DB and just before it's inserted into this RowCollection.

Overrides:
preprocessRow in class RowCollection

refresh

public RowCollection refresh()
                      throws CMException
Description copied from class: RowCollection
This method will refresh this RowCollection from the database and return this. Creation date: (12/10/2001 3:55:47 PM)

Overrides:
refresh in class RowCollection
Throws:
CMException

rowCollectionPopulated

protected void rowCollectionPopulated()
Invoked after all Rows have been read from the DB and added to this RowCollection. If this RC is the last RC (i.e. there is no next RC) then this method will add any necessary report break rows to the end of this RC.

Overrides:
rowCollectionPopulated in class RowCollection