mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
Complete migration of run
to runOneStep
in streamed-ETL load & transform steps
This commit is contained in:
@ -24,6 +24,7 @@ package com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwit
|
||||
|
||||
import java.util.Optional;
|
||||
import com.kingsrook.qqq.backend.core.actions.QBackendTransaction;
|
||||
import com.kingsrook.qqq.backend.core.context.QContext;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QException;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepInput;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepOutput;
|
||||
@ -51,31 +52,18 @@ public abstract class AbstractLoadStep
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Do the load logic for one page of records
|
||||
*******************************************************************************/
|
||||
@Deprecated
|
||||
public void run(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException
|
||||
{
|
||||
runOnePage(runBackendStepInput, runBackendStepOutput);
|
||||
}
|
||||
public abstract void runOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException;
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** todo - make abstract when run is deleted.
|
||||
*******************************************************************************/
|
||||
public void runOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Allow subclasses to do an action before the run is complete - before any
|
||||
** pages of records are passed in.
|
||||
** Allow subclasses to do an action before any pages of records are processed.
|
||||
*******************************************************************************/
|
||||
public void preRun(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException
|
||||
{
|
||||
this.session = runBackendStepInput.getSession();
|
||||
this.session = QContext.getQSession();
|
||||
}
|
||||
|
||||
|
||||
|
@ -46,29 +46,14 @@ public abstract class AbstractTransformStep implements ProcessSummaryProviderInt
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Do the transform logic for one page of records
|
||||
*******************************************************************************/
|
||||
@Deprecated
|
||||
public void run(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException
|
||||
{
|
||||
runOnePage(runBackendStepInput, runBackendStepOutput);
|
||||
}
|
||||
public abstract void runOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException;
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** todo - make abstract when run is deleted.
|
||||
*******************************************************************************/
|
||||
public void runOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Allow subclasses to do an action before the run is complete - before any
|
||||
** pages of records are passed in.
|
||||
** Allow subclasses to do an action before any pages of records are processed.
|
||||
*******************************************************************************/
|
||||
public void preRun(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException
|
||||
{
|
||||
|
@ -37,7 +37,6 @@ import com.kingsrook.qqq.backend.core.actions.customizers.TableCustomizers;
|
||||
import com.kingsrook.qqq.backend.core.actions.dashboard.PersonsByCreateDateBarChart;
|
||||
import com.kingsrook.qqq.backend.core.actions.dashboard.widgets.AbstractWidgetRenderer;
|
||||
import com.kingsrook.qqq.backend.core.actions.dashboard.widgets.ParentWidgetRenderer;
|
||||
import com.kingsrook.qqq.backend.core.actions.processes.BackendStep;
|
||||
import com.kingsrook.qqq.backend.core.actions.processes.CancelProcessActionTest;
|
||||
import com.kingsrook.qqq.backend.core.context.QContext;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QException;
|
||||
@ -2279,7 +2278,7 @@ public class QInstanceValidatorTest extends BaseTest
|
||||
///////////////////////////////////////////////
|
||||
// test classes for validating process steps //
|
||||
///////////////////////////////////////////////
|
||||
public abstract class TestAbstractClass extends AbstractTransformStep implements BackendStep
|
||||
public abstract class TestAbstractClass extends AbstractTransformStep
|
||||
{
|
||||
public void runOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException
|
||||
{
|
||||
@ -2291,7 +2290,7 @@ public class QInstanceValidatorTest extends BaseTest
|
||||
///////////////////////////////////////////////
|
||||
// //
|
||||
///////////////////////////////////////////////
|
||||
private class TestPrivateClass extends AbstractTransformStep implements BackendStep
|
||||
private class TestPrivateClass extends AbstractTransformStep
|
||||
{
|
||||
public void runOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException
|
||||
{
|
||||
@ -2311,7 +2310,7 @@ public class QInstanceValidatorTest extends BaseTest
|
||||
///////////////////////////////////////////////
|
||||
// //
|
||||
///////////////////////////////////////////////
|
||||
public class TestNoArgsConstructorClass extends AbstractTransformStep implements BackendStep
|
||||
public class TestNoArgsConstructorClass extends AbstractTransformStep
|
||||
{
|
||||
public TestNoArgsConstructorClass(int i)
|
||||
{
|
||||
|
Reference in New Issue
Block a user