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 recordRecord 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 voidaddOtherTableFilterToDelete(String tableName, QQueryFilter filter) protected voidaddOtherTableIdsToDelete(String tableName, Collection<Serializable> ids) protected voidaddOtherTableRecordsToStore(String tableName, Collection<QRecord> records) abstract QRecordbuildRecordToKeep(RunBackendStepInput runBackendStepInput, List<QRecord> duplicateRecords) Do the main work for this process - merge a list of records.protected abstract AbstractMergeDuplicatesTransformStep.MergeProcessConfigDefine 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 voidpreProcess(ListingHash<List<Serializable>, QRecord> duplicatesMap) Optional point where subclasses can pre-load data in-bulk on all the duplicates.voidrunOnePage(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, setTransactionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ProcessSummaryProviderInterfaceNote - 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:AbstractTransformStepDo the transform logic for one page of records- Specified by:
runOnePagein classAbstractTransformStep- Throws:
QException
-