Fix comments, cleanup from code review

This commit is contained in:
2023-06-02 09:11:29 -05:00
parent 5330f3de90
commit a4bd3b56f6
7 changed files with 14 additions and 35 deletions

View File

@ -221,9 +221,9 @@ public class DeleteAction
oldRecordList.ifPresent(l -> dmlAuditInput.setRecordList(l));
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());
if(postDeleteCustomizer.isPresent() && oldRecordList.isPresent())
{

View File

@ -136,9 +136,9 @@ public class InsertAction extends AbstractQActionFunction<InsertInput, InsertOut
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());
if(postInsertCustomizer.isPresent())
{

View File

@ -144,9 +144,9 @@ public class UpdateAction
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());
if(postUpdateCustomizer.isPresent())
{

View File

@ -26,10 +26,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
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.model.actions.processes.ProcessSummaryLine;
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.tables.InputSource;
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.metadata.tables.QTableMetaData;
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
** specified table.
** Load step for bulk-delete.
*******************************************************************************/
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)));
}
}

View File

@ -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 //
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
runBackendStepOutput.setRecords(runBackendStepInput.getRecords());
// i think load step will do this.
// okSummary.incrementCount(runBackendStepInput.getRecords().size());
}
}

View File

@ -139,9 +139,6 @@ public class BulkEditTransformStep extends AbstractTransformStep
outputRecords.add(recordToUpdate);
setUpdatedFieldsInRecord(runBackendStepInput, enabledFields, recordToUpdate);
}
// i think load step will do this.
// okSummary.incrementCount(runBackendStepInput.getRecords().size());
}
else
{

View File

@ -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
{