mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Fix comments, cleanup from code review
This commit is contained in:
@ -221,9 +221,9 @@ public class DeleteAction
|
|||||||
oldRecordList.ifPresent(l -> dmlAuditInput.setRecordList(l));
|
oldRecordList.ifPresent(l -> dmlAuditInput.setRecordList(l));
|
||||||
new DMLAuditAction().execute(dmlAuditInput);
|
new DMLAuditAction().execute(dmlAuditInput);
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// finally, run the pre-delete customizer, if there is one //
|
// finally, run the post-delete customizer, if there is one //
|
||||||
/////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
Optional<AbstractPostDeleteCustomizer> postDeleteCustomizer = QCodeLoader.getTableCustomizer(AbstractPostDeleteCustomizer.class, table, TableCustomizers.POST_DELETE_RECORD.getRole());
|
Optional<AbstractPostDeleteCustomizer> postDeleteCustomizer = QCodeLoader.getTableCustomizer(AbstractPostDeleteCustomizer.class, table, TableCustomizers.POST_DELETE_RECORD.getRole());
|
||||||
if(postDeleteCustomizer.isPresent() && oldRecordList.isPresent())
|
if(postDeleteCustomizer.isPresent() && oldRecordList.isPresent())
|
||||||
{
|
{
|
||||||
|
@ -136,9 +136,9 @@ public class InsertAction extends AbstractQActionFunction<InsertInput, InsertOut
|
|||||||
new DMLAuditAction().execute(new DMLAuditInput().withTableActionInput(insertInput).withRecordList(insertOutput.getRecords()));
|
new DMLAuditAction().execute(new DMLAuditInput().withTableActionInput(insertInput).withRecordList(insertOutput.getRecords()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// finally, run the pre-insert customizer, if there is one //
|
// finally, run the post-insert customizer, if there is one //
|
||||||
/////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
Optional<AbstractPostInsertCustomizer> postInsertCustomizer = QCodeLoader.getTableCustomizer(AbstractPostInsertCustomizer.class, table, TableCustomizers.POST_INSERT_RECORD.getRole());
|
Optional<AbstractPostInsertCustomizer> postInsertCustomizer = QCodeLoader.getTableCustomizer(AbstractPostInsertCustomizer.class, table, TableCustomizers.POST_INSERT_RECORD.getRole());
|
||||||
if(postInsertCustomizer.isPresent())
|
if(postInsertCustomizer.isPresent())
|
||||||
{
|
{
|
||||||
|
@ -144,9 +144,9 @@ public class UpdateAction
|
|||||||
new DMLAuditAction().execute(dmlAuditInput);
|
new DMLAuditAction().execute(dmlAuditInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// finally, run the pre-update customizer, if there is one //
|
// finally, run the post-update customizer, if there is one //
|
||||||
/////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
Optional<AbstractPostUpdateCustomizer> postUpdateCustomizer = QCodeLoader.getTableCustomizer(AbstractPostUpdateCustomizer.class, table, TableCustomizers.POST_UPDATE_RECORD.getRole());
|
Optional<AbstractPostUpdateCustomizer> postUpdateCustomizer = QCodeLoader.getTableCustomizer(AbstractPostUpdateCustomizer.class, table, TableCustomizers.POST_UPDATE_RECORD.getRole());
|
||||||
if(postUpdateCustomizer.isPresent())
|
if(postUpdateCustomizer.isPresent())
|
||||||
{
|
{
|
||||||
|
@ -26,10 +26,7 @@ import java.io.Serializable;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import com.kingsrook.qqq.backend.core.actions.QBackendTransaction;
|
|
||||||
import com.kingsrook.qqq.backend.core.actions.tables.InsertAction;
|
|
||||||
import com.kingsrook.qqq.backend.core.exceptions.QException;
|
import com.kingsrook.qqq.backend.core.exceptions.QException;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.processes.ProcessSummaryLine;
|
import com.kingsrook.qqq.backend.core.model.actions.processes.ProcessSummaryLine;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.processes.ProcessSummaryLineInterface;
|
import com.kingsrook.qqq.backend.core.model.actions.processes.ProcessSummaryLineInterface;
|
||||||
@ -38,7 +35,6 @@ import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepOutp
|
|||||||
import com.kingsrook.qqq.backend.core.model.actions.processes.Status;
|
import com.kingsrook.qqq.backend.core.model.actions.processes.Status;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.tables.InputSource;
|
import com.kingsrook.qqq.backend.core.model.actions.tables.InputSource;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.tables.QInputSource;
|
import com.kingsrook.qqq.backend.core.model.actions.tables.QInputSource;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.tables.insert.InsertInput;
|
|
||||||
import com.kingsrook.qqq.backend.core.model.data.QRecord;
|
import com.kingsrook.qqq.backend.core.model.data.QRecord;
|
||||||
import com.kingsrook.qqq.backend.core.model.metadata.tables.QTableMetaData;
|
import com.kingsrook.qqq.backend.core.model.metadata.tables.QTableMetaData;
|
||||||
import com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.LoadViaDeleteStep;
|
import com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.LoadViaDeleteStep;
|
||||||
@ -48,8 +44,7 @@ import com.kingsrook.qqq.backend.core.utils.CollectionUtils;
|
|||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
** Generic implementation of a LoadStep - that runs a Delete action for a
|
** Load step for bulk-delete.
|
||||||
** specified table.
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
public class BulkDeleteLoadStep extends LoadViaDeleteStep implements ProcessSummaryProviderInterface
|
public class BulkDeleteLoadStep extends LoadViaDeleteStep implements ProcessSummaryProviderInterface
|
||||||
{
|
{
|
||||||
@ -153,17 +148,4 @@ public class BulkDeleteLoadStep extends LoadViaDeleteStep implements ProcessSumm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
**
|
|
||||||
*******************************************************************************/
|
|
||||||
@Override
|
|
||||||
public Optional<QBackendTransaction> openTransaction(RunBackendStepInput runBackendStepInput) throws QException
|
|
||||||
{
|
|
||||||
InsertInput insertInput = new InsertInput();
|
|
||||||
insertInput.setTableName(runBackendStepInput.getValueString(FIELD_DESTINATION_TABLE));
|
|
||||||
|
|
||||||
return (Optional.of(new InsertAction().openTransaction(insertInput)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -151,9 +151,6 @@ public class BulkDeleteTransformStep extends AbstractTransformStep
|
|||||||
// no transformation needs done - just pass records through from input to output, and assume errors & warnings will come from the delete action //
|
// no transformation needs done - just pass records through from input to output, and assume errors & warnings will come from the delete action //
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
runBackendStepOutput.setRecords(runBackendStepInput.getRecords());
|
runBackendStepOutput.setRecords(runBackendStepInput.getRecords());
|
||||||
|
|
||||||
// i think load step will do this.
|
|
||||||
// okSummary.incrementCount(runBackendStepInput.getRecords().size());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,9 +139,6 @@ public class BulkEditTransformStep extends AbstractTransformStep
|
|||||||
outputRecords.add(recordToUpdate);
|
outputRecords.add(recordToUpdate);
|
||||||
setUpdatedFieldsInRecord(runBackendStepInput, enabledFields, recordToUpdate);
|
setUpdatedFieldsInRecord(runBackendStepInput, enabledFields, recordToUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
// i think load step will do this.
|
|
||||||
// okSummary.incrementCount(runBackendStepInput.getRecords().size());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,10 @@ import com.kingsrook.qqq.backend.core.model.actions.processes.Status;
|
|||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
** Helper class for process steps that want to roll up error summary and/or
|
||||||
|
** warning summary lines. e.g., if the process might have a handful of different
|
||||||
|
** error messages. Will record up to 50 unique errors, then throw the rest int
|
||||||
|
** an "other" errors summary.
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
public class ProcessSummaryWarningsAndErrorsRollup
|
public class ProcessSummaryWarningsAndErrorsRollup
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user