Skip to content

CTRL_TableDataSource

Class · Group: Controllers

apex
global inherited sharing class CTRL_TableDataSource

Controller class responsible for managing the instantiation of a data source class that supports the table data source interface. This controller allows fetching table data from dynamically specified classes, providing flexible table-based data retrieval capabilities.

Since: 1.0

Example:

apex
DTO_BaseTable result = CTRL_TableDataSource.fetch(
    'AccountTableSource',
    new Map<String, Object>{'industry' => 'Technology'}
);

See Also: IF_TableDataSource


Methods

MethodDescription
global static DTO_BaseTable fetch(String controllerName, String, Object> searchParameters)Dynamically creates an instance of a specified table data source controller and retrieves data based on the provided search parameters.

Method Details

fetch

apex
@AuraEnabled global static DTO_BaseTable fetch(String controllerName, Map<String, Object> searchParameters)

Dynamically creates an instance of a specified table data source controller and retrieves data based on the provided search parameters. The class specified by controllerName must implement the IF_TableDataSource interface.

Parameters:

  • controllerName (String) - The fully qualified class name of the data source controller to instantiate. The class must implement the IF_TableDataSource interface.
  • searchParameters (Map) - A map of search parameters, where each key-value pair specifies a criterion or filter to apply to the data source.

Returns: DTO_BaseTable - A DTO_BaseTable object containing the search results formatted as a table.

Since: 1.0

Example:

apex
DTO_BaseTable result = CTRL_TableDataSource.fetch('MyDataSource', new Map<String, Object>{'key' => 'value'});