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 enumaction 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, willNotUpdateFields inherited from interface com.kingsrook.qqq.backend.core.model.metadata.MetaDataProducerInterface
DEFAULT_SORT_ORDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ScheduledJobcustomizeScheduledJob(ScheduledJob scheduledJob, QRecord sourceRecord) protected QQueryFiltergetExistingRecordQueryFilter(RunBackendStepInput runBackendStepInput, List<Serializable> sourceKeyList) Define the query filter to find existing records.protected abstract Stringprotected abstract Stringprotected abstract Stringprotected abstract Stringprotected Stringprotected abstract StringDefine the config for this process - e.g., what fields invalid input: '&' tables are used.protected voidmakeSureSchedulerNameIsSet(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, runOnePageMethods 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.model.metadata.MetaDataProducerInterface
getSortOrder, getSourceClass, isEnabled, setSourceClassMethods 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:MetaDataProducerInterfaceProduce 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:
producein interfaceMetaDataProducerInterface<QProcessMetaData>- Throws:
QException
-
populateRecordToStore
public QRecord populateRecordToStore(RunBackendStepInput runBackendStepInput, QRecord destinationRecord, QRecord sourceRecord) throws QException Description copied from class:AbstractTableSyncTransformStepMap 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:
populateRecordToStorein 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:AbstractTableSyncTransformStepDefine 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:
getExistingRecordQueryFilterin classAbstractTableSyncTransformStep
-
getSyncProcessConfig
Description copied from class:AbstractTableSyncTransformStepDefine the config for this process - e.g., what fields invalid input: '&' tables are used.- Specified by:
getSyncProcessConfigin classAbstractTableSyncTransformStep
-
getScheduledJobForeignKeyType
-
getRecordForeignKeyFieldName
-
getRecordForeignKeyPossibleValueSourceName
-
getSourceTableName
-
getProcessNameScheduledJobParameter
-
getSourceTableKeyField
-