Class ScheduledJobTableCustomizer
java.lang.Object
com.kingsrook.qqq.backend.core.model.scheduledjobs.customizers.ScheduledJobTableCustomizer
- All Implemented Interfaces:
TableCustomizerInterface
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.kingsrook.qqq.backend.core.actions.customizers.TableCustomizerInterface
TableCustomizerInterface.NotImplementedHereException
-
Field Summary
Fields inherited from interface com.kingsrook.qqq.backend.core.actions.customizers.TableCustomizerInterface
LOG
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionpostDelete
(DeleteInput deleteInput, List<QRecord> records) Custom actions after a delete takes place.postInsert
(InsertInput insertInput, List<QRecord> records) custom actions after an insert takes place.postUpdate
(UpdateInput updateInput, List<QRecord> records, Optional<List<QRecord>> oldRecordList) custom actions after an update takes place.preInsert
(InsertInput insertInput, List<QRecord> records, boolean isPreview) custom actions before an insert takes place.preUpdate
(UpdateInput updateInput, List<QRecord> records, boolean isPreview, Optional<List<QRecord>> oldRecordList) custom actions before an update takes place.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.actions.customizers.TableCustomizerInterface
oldRecordListToMap, postInsertOrUpdate, postQuery, preDelete, preInsertOrUpdate, whenToRunPreInsert
-
Constructor Details
-
ScheduledJobTableCustomizer
public ScheduledJobTableCustomizer()
-
-
Method Details
-
preInsert
public List<QRecord> preInsert(InsertInput insertInput, List<QRecord> records, boolean isPreview) throws QException Description copied from interface:TableCustomizerInterface
custom actions before an insert takes place. It's important for implementations to be aware of the isPreview field, which is set to true when the code is running to give users advice, e.g., on a review screen - vs. being false when the action is ACTUALLY happening. So, if you're doing things like storing data, you don't want to do that if isPreview is true!! General implementation would be, to iterate over the records (the inputs to the insert action), and look at their values: - possibly adding Errors (`addError`) or Warnings (`addWarning`) to the records - possibly manipulating values (`setValue`) - possibly throwing an exception - if you really don't want the insert operation to continue. - doing "whatever else" you may want to do. - returning the list of records (can be the input list) that you want to go on to the backend implementation class.- Specified by:
preInsert
in interfaceTableCustomizerInterface
- Throws:
QException
-
postInsert
Description copied from interface:TableCustomizerInterface
custom actions after an insert takes place. General implementation would be, to iterate over the records (the outputs of the insert action), and look at their values: - possibly adding Errors (`addError`) or Warnings (`addWarning`) to the records - possibly throwing an exception - though doing so won't stop the update, and instead will just set a warning on all of the updated records... - doing "whatever else" you may want to do. - returning the list of records (can be the input list) that you want to go back to the caller.- Specified by:
postInsert
in interfaceTableCustomizerInterface
- Throws:
QException
-
preUpdate
public List<QRecord> preUpdate(UpdateInput updateInput, List<QRecord> records, boolean isPreview, Optional<List<QRecord>> oldRecordList) throws QException Description copied from interface:TableCustomizerInterface
custom actions before an update takes place. It's important for implementations to be aware of the isPreview field, which is set to true when the code is running to give users advice, e.g., on a review screen - vs. being false when the action is ACTUALLY happening. So, if you're doing things like storing data, you don't want to do that if isPreview is true!! General implementation would be, to iterate over the records (the inputs to the update action), and look at their values: - possibly adding Errors (`addError`) or Warnings (`addWarning`) to the records - possibly manipulating values (`setValue`) - possibly throwing an exception - if you really don't want the update operation to continue. - doing "whatever else" you may want to do. - returning the list of records (can be the input list) that you want to go on to the backend implementation class. Note, "old records" (e.g., with values freshly fetched from the backend) will be available (if the backend supports it)- Specified by:
preUpdate
in interfaceTableCustomizerInterface
- Throws:
QException
-
postUpdate
public List<QRecord> postUpdate(UpdateInput updateInput, List<QRecord> records, Optional<List<QRecord>> oldRecordList) throws QException Description copied from interface:TableCustomizerInterface
custom actions after an update takes place. General implementation would be, to iterate over the records (the outputs of the update action), and look at their values: - possibly adding Errors (`addError`) or Warnings (`addWarning`) to the records? - possibly throwing an exception - though doing so won't stop the update, and instead will just set a warning on all of the updated records... - doing "whatever else" you may want to do. - returning the list of records (can be the input list) that you want to go back to the caller. Note, "old records" (e.g., with values freshly fetched from the backend) will be available (if the backend supports it).- Specified by:
postUpdate
in interfaceTableCustomizerInterface
- Throws:
QException
-
postDelete
Description copied from interface:TableCustomizerInterface
Custom actions after a delete takes place. General implementation would be, to iterate over the records (ones which didn't have a delete error), and look at their values: - possibly adding Errors (`addError`) or Warnings (`addWarning`) to the records? - possibly throwing an exception - though doing so won't stop the delete, and instead will just set a warning on all of the deleted records... - doing "whatever else" you may want to do. - returning the list of records (can be the input list) that you want to go back to the caller - this is how errors and warnings are propagated .- Specified by:
postDelete
in interfaceTableCustomizerInterface
- Throws:
QException
-