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, 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.
 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.
 RowCollection refresh()
          This method will refresh this RowCollection from the database and return this.
 
Methods inherited from class planetj.database.RowCollection
add, add, addAll, addAll, addFDRows, addRow, addRow, addRowEventListener, addTable, advanceRowCollection, batchProcess, clear, clearRows, clearTables, clearValidationExceptions, clone, cloneRowCollection, contains, contains, containsAll, containsRowWithFieldsEqualTo, copyToConnection, copyToConnection, copyToConnection, createAction, createFieldDescriptor, createNamedActionRequest, createRowCollection, createRowCollection, delete, delete, delete, delete, doesFieldDescriptorExist, exportToPDF, filter, filter, filter, firstRow, get, getActionDefaultLocation, getActionDescriptor, getActionRequest, getActionRequest, getActions, getActionsForOperation, getActionsForRow, getActionsForRowFields, getAllRemainingRows, getAttribute, getColumnCount, getColumnValues, getColumnValues, getColumnValuesByUsageId, getCompleteRowCollection, getCompleteRowCollection, getConfigProperty, getConnectedChildren, 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, getRowCollectionHandledActionNames, getRowCount, getRows, 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, isActionApplicable, isActionsSameForAllRowFields, isActionsSameForAllRows, isARow, isARowCollection, isCloneNeeded, isCurrent, isEmpty, isFromCache, isFromGroupBy, isFromJoin, isGraphable, isHasColumnNames, isHasRowEventListners, isInCache, isLocked, isOkToReturnMeFromCache, isPersistent, isRowCollectionContainEditableRow, isRowInsertable, isValidateRequired, iterator, lastIndexOf, listIterator, listIterator, newRow, newRow, openFor, prepareFileDescriptor, prepareForCache, prepareForDisplay, prepareForResults, prepareForReturnFromCache, prepareFromFieldNames, reconcile, reconcile, refreshIfNeeded, remove, remove, removeAll, removeAllRows, removeAttribute, removeNavigationKey, removeRow, removeRow, removeRow, removeRowBasedOnKeyValues, removeRowEventListener, removeTable, replaceRow, resetDisplayValues, retainAll, rollbackChanges, rowAltered, set, setAttribute, setColumnValues, setContainedClass, setFieldValuesWithCommonUsageIds, setInCache, setInsertSQLContext, setLastUpdated, setNavigationKey, setPageNumber, setPropertyGroups, setResultSet, setRow, setSortedColumnNames, setSql, 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, 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

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.


getReportRowCount

public static int getReportRowCount(RowCollection rc)
Gets the number of ReportBreakRows currently contained in the 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