...
The key attributes provided by a DatabaseRequest are provided –in the following table:
Attribute or Operation | Purpose |
int startRowNo; | This sets the starting row number for Pagination purposes |
int endRowNo; | This sets the ending row number for Pagination purposes |
PaginationModel paginationModel; | This sets the starting and ending row number for Pagination purposes using PaginationModel Object |
SortingModel sortingModel; | This sets the sorting conditions that should be applied to the DML using the SortingModel Object |
String dataAccessMapKey; | This sets the Data Access Map Key that is part of the DML Locator |
int operation; | This sets the operation to be executed. This has to one of the constants from DatabaseConstants. |
String operationExtension; | This sets the operation extension that is part of the DML Locator |
String dataSource; | This sets the logical data source that should be used for executing the DML. |
String dbAccessImpl; | This sets the actual underlying data access manager that needs to be used for that specific execution. This is typically not changed at a per request level. Rather there is a system level default provided as a configuration to the Canvas Configuration System that is defaulted. |
Map data; | This Map contains the data (could be flat or hierarchical) that should be used as part of the request. The Data Access Layer implementation can choose how it wants to use the data as part of any operation execution. |
List<Map> batchData; | This is a List of Maps that should be executed as a batch. This will be used by the Data access Layer implementation only of the operation is a Batch related operation. |
boolean queryAsMap; | This flag indicates whether the request should be executed with the intent of ultimately getting the result as a Map. By default this is set to false. When false, the control of the result packaging is left to the data access layer implementation. |
void addDataToBatch(Map aRow); | This method can be used to add a particular data set as a batch. This will be used by the Data access Layer implementation only of the operation is a Batch related operation. |
void clearFilters(); | This method can be used to clear any earlier filters that have been added to this request. |
void addFilter(String colName, Object Value) | This method is used to add a filter for the specific column for the specific value. |
DatabaseResult execute(); | This is the method that actually triggers the execution of this request. |
DatabaseResult getDatabaseResult(); | This is a helper method that returns the result that created post execution. |