fferpcore.FilteringDataSourceDecoratorglobal with sharing class FilteringDataSourceDecorator extends DataSource Filters a fferpcore.DataSource using a PublicationMatcher. This class extends fferpcore.DataSource Methods
FilteringDataSourceDecoratorglobal FilteringDataSourceDecorator(fferpcore.DataSource subject, fferpcore.PublicationMatcher matcher) Constructor to create a filtering DataSource. Input Parameters
requireFieldglobal override void requireField(SObjectField field) Implements requireField(SObjectField field) on DataSource. Calls requireField(SObjectField field) on the fferpcore.DataSource provided in the constructor. Input Parameters
requireFieldglobal override void requireField(String fieldName) Implements requireField(String fieldName) on DataSource. Calls requireField(String fieldName) on the fferpcore.DataSource provided in the constructor. Input Parameters
requireglobal override void require(fferpcore.Path path) Implements require(Path path) on DataSource. Calls require(Path path) on the fferpcore.DataSource provided in the constructor. Input Parameters
requireLookupFieldglobal override fferpcore.DataSource requireLookupField(SObjectField field) Implements requireLookupField(SObjectField field) on DataSource. Calls requireLookupField(SObjectField field) on the fferpcore.DataSource provided in the constructor. Input Parameters
Return ValueA DataSource representing the target of the lookup. requireLookupFieldglobal override fferpcore.DataSource requireLookupField(String name) Implements requireLookupField(String name) on DataSource. Calls requireLookupField(String name) on the fferpcore.DataSource provided in the constructor. Input Parameters
Return ValueA DataSource representing the target of the lookup. requireOneToManyFieldglobal override fferpcore.DataSource requireOneToManyField(fferpcore.DataSource.BackReference backReference) Implements requireOneToManyField(DataSource.BackReference backReference) on DataSource. Calls requireOneToManyField(DataSource.BackReference backReference) on the fferpcore.DataSource provided in the constructor. Input Parameters
Return ValueA DataSource representing the target of the lookup. runQueryglobal override Iterator<Row> runQuery() Implements runQuery() on DataSource. Calls runQuery() on the fferpcore.DataSource provided in the constructor. The results of this query are filtered based on the fferpcore.PublicationMatcher provided to the description and only results matching the query will be returned. Return ValueAn iterator of fferpcore.DataSource.Row objects containing the required data. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. public class ExampleDataSource extends fferpcore.DataSource { private Set<SObjectField> m_fields; public ExampleDataSource() { } public override void requireField(SObjectField field) { m_fields.add(field); } public override Iterator<fferpcore.DataSource.Row> runQuery() { // Run SOQL to retrieve the data in m_fields } } ExampleDataSource source = new ExampleDataSource(); source.requireField(Account.Name); source.requireField(Account.AccountNumber); Iterator<fferpcore.DataSource.Row> rows = source.runQuery(); //use rows to construct a message |