Class AbstractRecordSyncToScheduledJobProcess
java.lang.Object
com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.AbstractTransformStep
com.kingsrook.qqq.backend.core.processes.implementations.tablesync.AbstractTableSyncTransformStep
com.kingsrook.qqq.backend.core.scheduler.processes.AbstractRecordSyncToScheduledJobProcess
- All Implemented Interfaces:
MetaDataProducerInterface<QProcessMetaData>
,ProcessSummaryProviderInterface
public abstract class AbstractRecordSyncToScheduledJobProcess
extends AbstractTableSyncTransformStep
implements MetaDataProducerInterface<QProcessMetaData>
Base class to manage creating scheduled jobs based on records in another table
Expected to be used via BaseSyncToScheduledJobTableCustomizer - see its javadoc.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
action flags that can be put in an insert/update/delete input to control behavior of this process.Nested classes/interfaces inherited from class com.kingsrook.qqq.backend.core.processes.implementations.tablesync.AbstractTableSyncTransformStep
AbstractTableSyncTransformStep.SyncProcessConfig
-
Field Summary
FieldsFields inherited from class com.kingsrook.qqq.backend.core.processes.implementations.tablesync.AbstractTableSyncTransformStep
errorMissingKeyField, LOG_TRANSFORM_RESULTS, okToInsert, okToUpdate, possibleValueTranslator, recordLookupHelper, runBackendStepInput, runBackendStepOutput, SYNC_TABLE_PERFORM_INSERTS_KEY, SYNC_TABLE_PERFORM_UPDATES_KEY, unspecifiedError, willNotInsert, willNotUpdate
Fields inherited from interface com.kingsrook.qqq.backend.core.model.metadata.MetaDataProducerInterface
DEFAULT_SORT_ORDER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ScheduledJob
customizeScheduledJob
(ScheduledJob scheduledJob, QRecord sourceRecord) protected QQueryFilter
getExistingRecordQueryFilter
(RunBackendStepInput runBackendStepInput, List<Serializable> sourceKeyList) Define the query filter to find existing records.protected abstract String
protected abstract String
protected abstract String
protected abstract String
protected String
protected abstract String
Define the config for this process - e.g., what fields invalid input: '&' tables are used.protected void
makeSureSchedulerNameIsSet
(ScheduledJob scheduledJob) populateRecordToStore
(RunBackendStepInput runBackendStepInput, QRecord destinationRecord, QRecord sourceRecord) Map a record from the source table to the destination table.Produce the metaData object.Methods inherited from class com.kingsrook.qqq.backend.core.processes.implementations.tablesync.AbstractTableSyncTransformStep
addAuditForExecuteStep, buildExistingRecordsMap, extractSourceKeyValueFromRecord, getAssociationNamesToInclude, getErrorProcessSummaryLines, getExistingRecord, getExistingRecordsByForeignKey, getLookupsToPreLoad, getProcessSummary, getQueryJoins, initializeRecordLookupHelper, logResults, reinitializeRecordLookupHelper, runOnePage
Methods 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.model.metadata.MetaDataProducerInterface
getSortOrder, getSourceClass, isEnabled, setSourceClass
Methods inherited from interface com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.ProcessSummaryProviderInterface
doGetProcessSummary
-
Field Details
-
SCHEDULER_NAME_FIELD_NAME
- See Also:
-
-
Constructor Details
-
AbstractRecordSyncToScheduledJobProcess
public AbstractRecordSyncToScheduledJobProcess()
-
-
Method Details
-
produce
Description copied from interface:MetaDataProducerInterface
Produce the metaData object. Generally, you don't want to add it to the instance yourself - but the instance is there in case you need it to get other metaData.- Specified by:
produce
in interfaceMetaDataProducerInterface<QProcessMetaData>
- Throws:
QException
-
populateRecordToStore
public QRecord populateRecordToStore(RunBackendStepInput runBackendStepInput, QRecord destinationRecord, QRecord sourceRecord) throws QException Description copied from class:AbstractTableSyncTransformStep
Map a record from the source table to the destination table. e.g., put values into the destinationRecord, from the sourceRecord. The destinationRecord will already be constructed, and will actually already be the record being updated, in the case of an update. It'll be empty (newly constructed) for an insert.- Specified by:
populateRecordToStore
in classAbstractTableSyncTransformStep
- Throws:
QException
-
makeSureSchedulerNameIsSet
- Throws:
QException
-
customizeScheduledJob
protected ScheduledJob customizeScheduledJob(ScheduledJob scheduledJob, QRecord sourceRecord) throws QException - Throws:
QException
-
getExistingRecordQueryFilter
protected QQueryFilter getExistingRecordQueryFilter(RunBackendStepInput runBackendStepInput, List<Serializable> sourceKeyList) Description copied from class:AbstractTableSyncTransformStep
Define the query filter to find existing records. e.g., for determining insert vs. update. Subclasses may override this to customize the behavior, e.g., in case an additional field is needed in the query.- Overrides:
getExistingRecordQueryFilter
in classAbstractTableSyncTransformStep
-
getSyncProcessConfig
Description copied from class:AbstractTableSyncTransformStep
Define the config for this process - e.g., what fields invalid input: '&' tables are used.- Specified by:
getSyncProcessConfig
in classAbstractTableSyncTransformStep
-
getScheduledJobForeignKeyType
-
getRecordForeignKeyFieldName
-
getRecordForeignKeyPossibleValueSourceName
-
getSourceTableName
-
getProcessNameScheduledJobParameter
-
getSourceTableKeyField
-