TPM_RTRReportingWrapper_AMS (Base Class)

TPM_RTRReportingWrapper_AMS is a base class that contains the structures to load the input. This class contains the list of KPIs and filter criteria that you chose in the report—selected time frame or the list of customers and products. Depending on various use cases, the payload method can contain different attributes.

The OutputRecord method returns product (pdim), KPI (kdim), time (tdim), and values (v). The values are defined in the actual logic class, which is TPM_RTRFunds_AMS in this use case. For example, you can use tdim to display values on a more granular view—weeks, months, or quarters. If a report meta has monthly values, the external datasource can also provide monthly values.

Ensure that kdim contains the name of the fund KPI.

Note

Sample Code

1global with sharing class TPM_RTRReportingWrapper_AMS
2{
3global class PeriodMonth {
4global Integer year;
5global Integer start;
6global Integer total;
7}
8global class InputPayload{
9global List <String> accountsfids;
10global List <String> productsfids;
11global PeriodMonth periodmonth;
12global List <String> kpis;
13global String responsetype;
14global String callingsfuser;
15}
16global class OutputRecord{
17global String pdim;
18global String kdim;
19global String tdim;
20global Double v;
21global OutputRecord( String pdim, String kdim , String tdim , Double v){
22this.pdim = pdim;
23this.kdim = kdim;
24this.tdim = tdim;
25this.v = v;
26}
27}
28}