Class actuate.data.Request
Description
Specifies a request for retrieving data and the conditions for that request. This class provides the scope for a request by defining a target element and a range of rows. The scope of the request determines what goes into a ResultSet. Functions that use request can only retrieve ResultSets from report elements that have an explicit bookmark.
Constructor
Syntax
Constructs a Request object that other classes use to retrieve data.
Parameters
String. A bookmark that identifies an Actuate report element. The actuate.data.Request object uses the bookmark to identify the report element to request information from. If null, Request uses the first bookmark. Functions that use request can only retrieve ResultSets from report elements that have an explicit bookmark.
Integer. The numerical index of the requested first row. The smallest valid value is 1.
Integer. The numerical index of the requested last row. The smallest valid value is 1.
Function summary
Table 4-12 lists actuate.data.Request functions.
Table 4-12 actuate.data.Request functionsactuate.data.Request.getBookmark
Syntax
Returns the bookmark name for this request.
Returns
String. The bookmark used in the Request object’s constructor.
Example
This example retrieves the bookmark that was used when the specified Request object was instantiated.
actuate.data.Request.getColumns
Syntax
Returns a list of column names that match the request.
Returns
Array of strings. The column names.
Example
This example retrieves the first, third, and fifth column names from the request object myRequest.
actuate.data.Request.getFilters
Syntax
Returns filters set for this request.
Returns
Array of actuate.data.Filter objects.
actuate.data.Request.getMaxRows
Syntax
Returns the index of the last row as an integer.
Returns
Integer. The maxRow value used in the Request object’s constructor.
actuate.data.Request.getSorters
Syntax
Returns sorters defined in this data condition.
Returns
Array of actuate.data.Sorter objects.
actuate.data.Request.getStartRow
Syntax
Returns the index of the starting row as an integer.
Returns
Integer. The startRow value used in the Request object’s constructor.
actuate.data.Request.setBookmark
Syntax
Parameters
String. The name of a bookmark.
Example
This example sets the bookmark for the myRequest object to the string myRequestStart.
actuate.data.Request.setColumns
Syntax
Sets the columns of data to request.
Parameters
An array of strings designating the columns of requested data. Use an array for this argument, even if there is only one value.
actuate.data.Request.setFilters
Syntax
Adds filters to a request. Filters further refine the set of data provided by a request. Using setFilter removes the previous filters from the Request object. All of the filters set in a request are applied when the request is used.
Parameters
An array of actuate.data.Filter objects or a single actuate.data.Filter object to refine the request. Use an array for this argument, even if there is only one value.
actuate.data.Request.setMaxRows
Syntax
Parameters
Integer. The numerical value of the index for the last row to request. The minimum value is 1.
Example
This example sets the index of the last row for the myRequest request object to 50.
actuate.data.Request.setSorters
Syntax
Adds sorters to a request to sort the set of data that a request provides. Sorting the data increases the effectiveness of requests by providing the data in a relevant order. Using setSorters removes the previous sorter objects from the request object. All of the sorters set in a request are applied when the request is used.
Sorters are applied in the order that they occur in the array. For example, if the first sorter specifies sorting on a state column and the second sorter specifies sorting on a city column, the result set is sorted by city within each state.
Parameters
An array of actuate.data.Sorter objects or a single actuate.data.Sorter object to sort the result of the request. Use an array for this argument, even if there is only one value.
Example
This example sets the alphaNumericSorterSet array in myRequest.
actuate.data.Request.setStartRow
Syntax
Parameters
Integer. The numerical value of the index for the first row to request. The minimum value is 1.
Example
This example sets the index of the first row for the myRequest request object to 10.
(c) Copyright Actuate Corporation 2011 |
![]() |