Class AbstractMergeDuplicatesTransformStep
java.lang.Object
com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.AbstractTransformStep
com.kingsrook.qqq.backend.core.processes.implementations.mergeduplicates.AbstractMergeDuplicatesTransformStep
- All Implemented Interfaces:
ProcessSummaryProviderInterface
This class is for merging duplicate records in a table.
We must define for the table one or more fields that we'll use to mark records as unique
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Record to store the config for this process - e.g., what fields invalid input: '&' tables are used.static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addOtherTableFilterToDelete
(String tableName, QQueryFilter filter) protected void
addOtherTableIdsToDelete
(String tableName, Collection<Serializable> ids) protected void
addOtherTableRecordsToStore
(String tableName, Collection<QRecord> records) abstract QRecord
buildRecordToKeep
(RunBackendStepInput runBackendStepInput, List<QRecord> duplicateRecords) Do the main work for this process - merge a list of records.protected abstract AbstractMergeDuplicatesTransformStep.MergeProcessConfig
Define the config for this process - e.g., what fields invalid input: '&' tables are used.getProcessSummary
(RunBackendStepOutput runBackendStepOutput, boolean isForResultScreen) Note - object needs to be serializable, and List isn't... so, use ArrayList?protected void
preProcess
(ListingHash<List<Serializable>, QRecord> duplicatesMap) Optional point where subclasses can pre-load data in-bulk on all the duplicates.void
runOnePage
(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) Do the transform logic for one page of recordsMethods inherited from class com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.AbstractTransformStep
getOverrideRecordPipeCapacity, getTransaction, postRun, preRun, setTransaction
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.ProcessSummaryProviderInterface
doGetProcessSummary
-
Field Details
-
runBackendStepInput
-
-
Constructor Details
-
AbstractMergeDuplicatesTransformStep
public AbstractMergeDuplicatesTransformStep()
-
-
Method Details
-
buildRecordToKeep
public abstract QRecord buildRecordToKeep(RunBackendStepInput runBackendStepInput, List<QRecord> duplicateRecords) throws QException, AbstractMergeDuplicatesTransformStep.SkipTheseRecordsException Do the main work for this process - merge a list of records. May also call addOtherTableIdsToDelete, addOtherTableFilterToDelete, and addOtherTableRecordsToStore -
getMergeProcessConfig
Define the config for this process - e.g., what fields invalid input: '&' tables are used. -
preProcess
Optional point where subclasses can pre-load data in-bulk on all the duplicates.- Throws:
QException
-
getProcessSummary
public ArrayList<ProcessSummaryLineInterface> getProcessSummary(RunBackendStepOutput runBackendStepOutput, boolean isForResultScreen) Description copied from interface:ProcessSummaryProviderInterface
Note - object needs to be serializable, and List isn't... so, use ArrayList? -
addOtherTableIdsToDelete
-
addOtherTableFilterToDelete
-
addOtherTableRecordsToStore
-
runOnePage
public void runOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException Description copied from class:AbstractTransformStep
Do the transform logic for one page of records- Specified by:
runOnePage
in classAbstractTransformStep
- Throws:
QException
-