Class LoadViaInsertOrUpdateStep
java.lang.Object
com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.AbstractLoadStep
com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.LoadViaInsertOrUpdateStep
- Direct Known Subclasses:
MergeDuplicatesLoadStep
Generic implementation of a LoadStep - that runs Insert and/or Update
actions for the destination table - where the presence or absence of the
record's primaryKey field is the indicator for which to do. e.g., it assumes
auto-generated ids, to be populated upon insert.
-
Field Summary
FieldsFields inherited from class com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.AbstractLoadStep
session
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
evaluateRecords
(RunBackendStepInput runBackendStepInput) protected InputSource
void
insertAndUpdateRecords
(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) openTransaction
(RunBackendStepInput runBackendStepInput) void
runOnePage
(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) Execute the backend step - using the request as input, and the result as output.protected void
splitRecordsForInsertOrUpdate
(List<QRecord> inputList, String primaryKeyFieldName, List<QRecord> insertList, List<QRecord> updateList) Methods inherited from class com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.AbstractLoadStep
getOverrideRecordPipeCapacity, getTransaction, getTransformStep, postRun, preRun, setTransaction, setTransformStep, withTransformStep
-
Field Details
-
FIELD_DESTINATION_TABLE
- See Also:
-
FIELD_SKIP_UNIQUE_KEY_CHECK
- See Also:
-
recordsToInsert
-
recordsToUpdate
-
-
Constructor Details
-
LoadViaInsertOrUpdateStep
public LoadViaInsertOrUpdateStep()
-
-
Method Details
-
getInputSource
-
runOnePage
public void runOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException Execute the backend step - using the request as input, and the result as output.- Specified by:
runOnePage
in classAbstractLoadStep
- Throws:
QException
-
insertAndUpdateRecords
public void insertAndUpdateRecords(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException - Throws:
QException
-
openTransaction
public Optional<QBackendTransaction> openTransaction(RunBackendStepInput runBackendStepInput) throws QException - Overrides:
openTransaction
in classAbstractLoadStep
- Throws:
QException
-
evaluateRecords
- Throws:
QException
-
splitRecordsForInsertOrUpdate
-