|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.crystaldecisions.sdk.occa.report.application.RowsetController
public class RowsetController
This object is used to retrieve unformatted data in the report directly. In other words, it
provides access to the rowsets in the ReportClientDocument. When data is retrieved from
the database, it is filtered, grouped, and sorted, and then stored in a tree structure called the
Totaller. The RowsetController allows you to search for and access this data in the
tree. Additionally, it allows you some control over how the data is retrieved and cached by both
the server and the client.
| Method Summary | |
|---|---|
void |
applyParameterFields(RowsetRequest request)
For internal use only. |
Records |
browseFieldsValues(Fields browseFields,
int cLimit)
For internal use only |
Values |
browseFieldValues(IField field,
int cLimit)
Allows you to browse the values for a particular field in one of the tables from the database server. |
Records |
browseTableValues(ITable table,
int cLimit)
Allows you to browse the values for any field in the specified table from the database server. |
boolean |
canBrowseField(IField field)
Returns true if a given field has data that can be browsed, and
false otherwise. |
boolean |
canBrowseTable(ITable table)
For internal use only |
void |
clearClientCaches()
For internal use only |
RowsetCursor |
createCursor(IGroupPath groupPath,
IRowsetMetaData metaData)
Creates a cursor to navigate the set of data fetched from the server. |
void |
emptyBatch(IRowset rowset,
int batchNumber)
For internal use only. |
void |
fetchRowsetBatchByRowN(IGroupPath groupPath,
IRowset rowset,
int rowNumber)
For internal use only. |
int |
findRowNByRecordKey(RowsetCursor cursor,
int recordKey)
Returns the row number given a record key; it converts the record number to a row number if the record numbers in the rowset are not consecutive. |
void |
fireOnRowsetBatchChanged(IGroupPath groupPath,
IRowset rowset)
For internal use only. |
void |
fireOnRowsetMoreBatchChanged(IRowset rowset,
int batchNumber)
For internal use only. |
void |
fireOnSearchResultChanged(RowsetSearchResult searchHandle,
boolean moreRecords)
For internal use only. |
IRowsetMetaData |
getDefaultMetaData(IGroupPath pGroupPath)
For internal use only. |
int |
getDefaultNumOfBrowsingRecords()
Returns the number of records that are retrieved when using the various browse methods ( browseFieldValues
method, browseTableValues method) that examine the
contents of the report's database. |
int |
getFirstRecordKey(IGroupPath pGroupPath)
Returns the record key for the first record under the specified group path. |
LOVRowsetProcessorHost |
getLOVRowsetProcessorHost()
For internal use only. |
int |
getMaxNumOfRecords()
Returns the maximum number of records that are to be retrieved from the database. |
java.util.Locale |
getProductLocale()
|
int |
getRefreshOptions()
Returns the options used by the RowsetController.refresh() method for refreshing the rowset. |
IRowset |
getRowset(IGroupPath groupPath,
IRowsetMetaData metaData)
For internal use only. |
int |
getRowsetBatchSize()
Returns the number of records in each batch in the rowset. |
java.lang.String |
getSQLStatement(IGroupPath groupPath,
java.lang.String specialStatement)
Returns the SQL statement that is used to return records from the database. |
TotallerNodes |
getSubTotallerNodes(IGroupPath parentGroup)
Returns the subnodes that belong to the root node of a specified parent group path. |
ITotallerNode |
getTotallerNode(IGroupPath pGroupPath)
Returns the TotallerNode object in the given group path. |
boolean |
isServerCacheFilled()
For internal use only. |
ResultInfo |
performFetchRowsetRequest(RowsetRequest request,
int requestOptions,
java.lang.Object additionalFetchRowsetInfo)
For internal use only. |
ResultInfo |
performFetchSearchResultRequest(RowsetRequest request,
int requestOptions,
java.lang.Object additionalFetchSearchResultInfo)
For internal use only. |
void |
refresh()
Clears both the client's cache and the server's cache. |
void |
setDefaultNumOfBrowsingRecords(int defaultNumOfBrowsingRecords)
Sets the number of records that are retrieved when using the various browse methods ( browseFieldValues
method, browseTableValues method) that examine the
contents of the report's database. |
void |
setMaxNumOfRecords(int maxNumOfRecords)
Sets the maximum number of records that are to be retrieved from the database. |
void |
setNumOfCachedBatches(int maxNumOfCachedBatches)
Sets the number of rowset batches that will be cached in the RowsetCursor. |
void |
setRefreshOptions(int newOptions)
Sets the options used by the RowsetController.refresh() method for refreshing the rowset. |
void |
setRowsetBatchSize(int newRowsetBatchSize)
Sets the number of records in each batch in the rowset. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Records browseFieldsValues(Fields browseFields,
int cLimit)
throws ReportSDKException
ReportSDKException
public Values browseFieldValues(IField field,
int cLimit)
throws ReportSDKException
Allows you to browse the values for a particular field in one of the tables from the database server. The retrieved data is not filtered, and the values are all unique; duplicate values are discarded. The data will be retrieved first from the client's cache--if it is available--and then from the server's cache. If the data is not in either cache, it is retrieved from the database.
Use the canBrowseField method to see if a particular field
has data that can be browsed.
field - The field whose values are to be examined. A field can be retrieved using the
getDatabase method in the
DatabaseController object.cLimit - The maximum number of records that will be returned from the database. If this
property is 0 or less, then the DefaultNumOfBrowsingRecords will be retrieved when
the report is refreshed.
Values object containing the values to be browsed.
ReportSDKException
public Records browseTableValues(ITable table,
int cLimit)
throws ReportSDKException
Allows you to browse the values for any field in the specified table from the database server. The data will be retrieved first from the client's cache--if it is available--and then from the server's cache. If the data is not in either cache, it is retrieved from the database.
table - The table whose field values are to be examined. A table may be retrieved using
the getDatabase method in the
DatabaseController object, DataDefController object,
or ReportClientDocument object.cLimit - The maximum number of records that will be returned from the database. If this
property is 0 or less, the DefaultNumOfBrowsingRecords will be retrieved when the
report is refreshed.
Records object containing the values you wish to browse.
ReportSDKExceptionpublic boolean canBrowseTable(ITable table)
public boolean canBrowseField(IField field)
Returns true if a given field has data that can be browsed, and
false otherwise. Before using the
browseFieldValues method, use this method to see if a
particular field has data that can be browsed.
field - The field for which browse information is requested.
true if a given field has data that can be browsed, and
false otherwise.public void clearClientCaches()
public RowsetCursor createCursor(IGroupPath groupPath,
IRowsetMetaData metaData)
throws ReportSDKException
Creates a cursor to navigate the set of data fetched from the server. Creating a
RowsetCursor object results in the creation of a Rowset object
whose data is based on the specified group path. Use the RowsetCursor object's
getRowset()
method to retrieve the Rowset object.
By default, the metadata contains fields belonging to the next level. The exception is when the group level is 0; in this case, the grand total is returned, as well as the fields belonging to group level 1. If no group path is specified, then the result fields and the group condition fields are used as data fields
groupPath - This indicates which rowset will be retrieved. Use null to
specify no group path.metaData - The fields to be included in the rowset. This object must contain the desired
fields for which you want data. If the fields are not added to the
DataDefinition object's ResultFields collection, then the
corresponding columns may be empty. The cursor supports the special field
ReportPath; add this special field type as crSpecialFieldTypeReportPath to the
metadata. By default, the RowsetController object adds a special
field RecordKey to the end of the metadata of the resultant Rowset
object.
ICursor object containing the newly created cursor.
ReportSDKException -
public void emptyBatch(IRowset rowset,
int batchNumber)
throws ReportSDKException
ReportSDKException
public void fetchRowsetBatchByRowN(IGroupPath groupPath,
IRowset rowset,
int rowNumber)
throws ReportSDKException
ReportSDKException
public int findRowNByRecordKey(RowsetCursor cursor,
int recordKey)
throws ReportSDKException
Returns the row number given a record key; it converts the record number to a row number if the record numbers in the rowset are not consecutive. This method is useful since the records in the Totaller are not stored in consecutive order if grouping, sorting, or filtering is applied. Additionally, the nodes in the Totaller do not store the row number from which the record came; they only store the record's key.
cursor - The cursor object that contains the rowset that was fetched from the server.recordKey - The key of the record for which the row number is requested. A key may be
obtained using the TotallerNode to which the record belongs.
int that specifies the row number of the given record key.
ReportSDKExceptionpublic IRowsetMetaData getDefaultMetaData(IGroupPath pGroupPath)
public int getDefaultNumOfBrowsingRecords()
Returns the number of records that are retrieved when using the various browse methods (browseFieldValues
method, browseTableValues method) that examine the
contents of the report's database.
The default value is 100. If this property is -1, then all records will be retrieved when the report is refreshed (not recommended).
int that specifies the number of records that are retrieved when
using various browse methods.RowsetController.setDefaultNumOfBrowsingRecords(int)
public int getFirstRecordKey(IGroupPath pGroupPath)
throws ReportSDKException
Returns the record key for the first record under the specified group path.
pGroupPath - The group path from the Totaller indicating which record you require a key
for.
int that specifies the record key for the first record under the
specified group path.
ReportSDKExceptionpublic int getMaxNumOfRecords()
Returns the maximum number of records that are to be retrieved from the database. The default value is -1, which means that all records will be retrieved when the report is refreshed. The entire result set needs to be retrieved in order for summaries, such as grand totals, to be correct.
int that specifies the maximum number of records that are to
be retrieved from the database.RowsetController.setMaxNumOfRecords(int)public void applyParameterFields(RowsetRequest request)
public int getRefreshOptions()
Returns the options used by the RowsetController.refresh() method for refreshing the rowset.
int that specifies the refresh options used when refreshing the
rowset.RowsetController.setRefreshOptions(int)
public IRowset getRowset(IGroupPath groupPath,
IRowsetMetaData metaData)
throws ReportSDKException
ReportSDKExceptionpublic int getRowsetBatchSize()
Returns the number of records in each batch in the rowset. The default value is 100. Specify -1 to retrieve all records in one batch.
int that specifies the number of records in each batch in the
rowset.RowsetController.setRowsetBatchSize(int)
public java.lang.String getSQLStatement(IGroupPath groupPath,
java.lang.String specialStatement)
throws ReportSDKException
Returns the SQL statement that is used to return records from the database. If the database
does not support SQL, the returned string will be empty. The SQL statement may differ
depending on the GroupPath for push-down group-by reports; the grouping for
these reports is done on the database server.
groupPath - The group path from the Totaller indicating which records you require an SQL
statement for.specialStatement - Reserved for future use.
String that specifies the SQL statement used to return records from
the database.
ReportSDKException
public TotallerNodes getSubTotallerNodes(IGroupPath parentGroup)
throws ReportSDKException
Returns the subnodes that belong to the root node of a specified parent group path.
parentGroup - This is the group path to the parent of the nodes you want to retrieve.
That is, the subnodes from the node represented by this group path will be
retrieved.
TotallerNodes object containing the subnodes that belong to the root
node of a specified parent group path.
ReportSDKException -
public ITotallerNode getTotallerNode(IGroupPath pGroupPath)
throws ReportSDKException
Returns the TotallerNode object in the given group path.
pGroupPath - The group path of the node you want to retrieve. Use null to
retrieve the root Totaller node.
ITotallerNode object in the given group path.
ReportSDKException
public boolean isServerCacheFilled()
throws ReportSDKException
For internal use only.
ReportSDKException
public void refresh()
throws ReportSDKException
Clears both the client's cache and the server's cache. The next time data is requested, it will be retrieved directly from the database.
You must call refresh() explicitly whenever you make changes to the report
that require a different set of records to be fetched from the database server. For example,
if you modify links or delete a record selection filter, you will want to hit the database in
order to retrieve the latest records. The only exception is when a new column is added; when
you add a new result field to the report, the database will be hit automatically.
ReportSDKException - public void setDefaultNumOfBrowsingRecords(int defaultNumOfBrowsingRecords)
Sets the number of records that are retrieved when using the various browse methods (browseFieldValues
method, browseTableValues method) that examine the
contents of the report's database.
The default value is 100. If this property is -1, then all records will be retrieved when the report is refreshed (not recommended).
defaultNumOfBrowsingRecords - An int that specifies the number of records
that are retrieved when using various browse methods.RowsetController.getDefaultNumOfBrowsingRecords()public void setMaxNumOfRecords(int maxNumOfRecords)
Sets the maximum number of records that are to be retrieved from the database. The default value is -1, which means that all records will be retrieved when the report is refreshed. The entire result set needs to be retrieved in order for summaries, such as grand totals, to be correct.
maxNumOfRecords - An int that specifies the maximum number of records
that are to be retrieved from the database.RowsetController.getMaxNumOfRecords()public void setNumOfCachedBatches(int maxNumOfCachedBatches)
Sets the number of rowset batches that will be cached in the RowsetCursor.
The RowsetCursor object created by
createCursor method
inherits this number. The default value is -1, which means that all batches will be cached.
If you are iterating through a large data set, you may want to set this value to a positive
integer. For example, if you set the value to 2, then only two batches will be kept in
memory.
maxNumOfCachedBatches - The maximum number of rowset batches that will be cached in the
RowsetCursor.public void setRefreshOptions(int newOptions)
Sets the options used by the RowsetController.refresh() method for refreshing the rowset.
newOptions - An int that specifies the refresh options used when
refreshing the rowset.RowsetController.getRefreshOptions()public void setRowsetBatchSize(int newRowsetBatchSize)
Sets the number of records in each batch in the rowset. The default value is 100. Specify -1 to retrieve all records in one batch.
newRowsetBatchSize - An int that specifies the number of records in each
batch in the rowset.RowsetController.getRowsetBatchSize()
public ResultInfo performFetchRowsetRequest(RowsetRequest request,
int requestOptions,
java.lang.Object additionalFetchRowsetInfo)
throws ReportSDKException
ReportSDKException
public ResultInfo performFetchSearchResultRequest(RowsetRequest request,
int requestOptions,
java.lang.Object additionalFetchSearchResultInfo)
throws ReportSDKException
ReportSDKException
public void fireOnRowsetMoreBatchChanged(IRowset rowset,
int batchNumber)
public void fireOnRowsetBatchChanged(IGroupPath groupPath,
IRowset rowset)
public void fireOnSearchResultChanged(RowsetSearchResult searchHandle,
boolean moreRecords)
public LOVRowsetProcessorHost getLOVRowsetProcessorHost()
throws ReportSDKException
ReportSDKExceptionpublic java.util.Locale getProductLocale()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||