CE-1405 Add dataSource as argument to ReportCustomRecordSourceInterface.execute

This commit is contained in:
2024-07-22 14:25:49 -05:00
parent 36307dba24
commit 2609bc801c
3 changed files with 4 additions and 3 deletions

View File

@ -453,7 +453,7 @@ public class GenerateReportAction extends AbstractQActionFunction<ReportInput, R
if(dataSource.getCustomRecordSource() != null) if(dataSource.getCustomRecordSource() != null)
{ {
ReportCustomRecordSourceInterface recordSource = QCodeLoader.getAdHoc(ReportCustomRecordSourceInterface.class, dataSource.getCustomRecordSource()); ReportCustomRecordSourceInterface recordSource = QCodeLoader.getAdHoc(ReportCustomRecordSourceInterface.class, dataSource.getCustomRecordSource());
recordSource.execute(reportInput, recordPipe); recordSource.execute(reportInput, dataSource, recordPipe);
return (true); return (true);
} }
else if(dataSource.getSourceTable() != null) else if(dataSource.getSourceTable() != null)

View File

@ -25,6 +25,7 @@ package com.kingsrook.qqq.backend.core.actions.reporting.customizers;
import com.kingsrook.qqq.backend.core.actions.reporting.RecordPipe; import com.kingsrook.qqq.backend.core.actions.reporting.RecordPipe;
import com.kingsrook.qqq.backend.core.exceptions.QException; import com.kingsrook.qqq.backend.core.exceptions.QException;
import com.kingsrook.qqq.backend.core.model.actions.reporting.ReportInput; import com.kingsrook.qqq.backend.core.model.actions.reporting.ReportInput;
import com.kingsrook.qqq.backend.core.model.metadata.reporting.QReportDataSource;
/******************************************************************************* /*******************************************************************************
@ -37,6 +38,6 @@ public interface ReportCustomRecordSourceInterface
/*************************************************************************** /***************************************************************************
** Given the report input, put records into the pipe, for the report. ** Given the report input, put records into the pipe, for the report.
***************************************************************************/ ***************************************************************************/
void execute(ReportInput reportInput, RecordPipe recordPipe) throws QException; void execute(ReportInput reportInput, QReportDataSource reportDataSource, RecordPipe recordPipe) throws QException;
} }

View File

@ -2398,7 +2398,7 @@ public class QInstanceValidatorTest extends BaseTest
** **
***************************************************************************/ ***************************************************************************/
@Override @Override
public void execute(ReportInput reportInput, RecordPipe recordPipe) throws QException public void execute(ReportInput reportInput, QReportDataSource reportDataSource, RecordPipe recordPipe) throws QException
{ {
} }