Class MultiCustomizer
java.lang.Object
com.kingsrook.qqq.backend.core.actions.customizers.MultiCustomizer
- All Implemented Interfaces:
TableCustomizerInterface,InitializableViaCodeReference
public class MultiCustomizer
extends Object
implements InitializableViaCodeReference, TableCustomizerInterface
Implementation of TableCustomizerInterface that runs multiple other customizers
-
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 TypeMethodDescriptionstatic voidaddTableCustomizer(QCodeReferenceWithProperties existingMultiCustomizerCodeReference, QCodeReference codeReference) Add an additional table customizer code reference to an existing codeReference, e.g., constructed by the `of` factory method.voidinitialize(QCodeReference codeReference) When this class is instantiated by the QCodeLoader, initialize the sub-customizer objects.static QCodeReferenceWithPropertiesof(QCodeReference... codeReferences) Factory method that builds aQCodeReferenceWithPropertiesthat will allow this multi-customizer to be assigned to a table, and to track in that code ref's properties, the "sub" QCodeReferences to be used.postDelete(DeleteInput deleteInput, List<QRecord> records) run postDelete method over all sub-customizerspostInsert(InsertInput insertInput, List<QRecord> records) run postInsert method over all sub-customizerspostQuery(QueryOrGetInputInterface queryInput, List<QRecord> records) run postQuery method over all sub-customizerspostUpdate(UpdateInput updateInput, List<QRecord> records, Optional<List<QRecord>> oldRecordList) run postUpdate method over all sub-customizerspreDelete(DeleteInput deleteInput, List<QRecord> records, boolean isPreview) run preDelete method over all sub-customizerspreInsert(InsertInput insertInput, List<QRecord> records, boolean isPreview) run preInsert method over all sub-customizerspreUpdate(UpdateInput updateInput, List<QRecord> records, boolean isPreview, Optional<List<QRecord>> oldRecordList) run preUpdate method over all sub-customizersMethods 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.actions.customizers.TableCustomizerInterface
oldRecordListToMap, postInsertOrUpdate, preInsertOrUpdate, whenToRunPreInsert
-
Constructor Details
-
MultiCustomizer
public MultiCustomizer()
-
-
Method Details
-
of
Factory method that builds aQCodeReferenceWithPropertiesthat will allow this multi-customizer to be assigned to a table, and to track in that code ref's properties, the "sub" QCodeReferences to be used. Added to a table as in:table.withCustomizer(TableCustomizers.POST_INSERT_RECORD, MultiCustomizer.of(QCodeReference(x), QCodeReference(y)));- Parameters:
codeReferences- one or moreobjectsto run when this customizer runs. note that they will run in the order provided in this list.
-
addTableCustomizer
public static void addTableCustomizer(QCodeReferenceWithProperties existingMultiCustomizerCodeReference, QCodeReference codeReference) Add an additional table customizer code reference to an existing codeReference, e.g., constructed by the `of` factory method.- See Also:
-
initialize
When this class is instantiated by the QCodeLoader, initialize the sub-customizer objects.- Specified by:
initializein interfaceInitializableViaCodeReference
-
postQuery
public List<QRecord> postQuery(QueryOrGetInputInterface queryInput, List<QRecord> records) throws QException run postQuery method over all sub-customizers- Specified by:
postQueryin interfaceTableCustomizerInterface- Throws:
QException
-
preInsert
public List<QRecord> preInsert(InsertInput insertInput, List<QRecord> records, boolean isPreview) throws QException run preInsert method over all sub-customizers- Specified by:
preInsertin interfaceTableCustomizerInterface- Throws:
QException
-
postInsert
run postInsert method over all sub-customizers- Specified by:
postInsertin interfaceTableCustomizerInterface- Throws:
QException
-
preUpdate
public List<QRecord> preUpdate(UpdateInput updateInput, List<QRecord> records, boolean isPreview, Optional<List<QRecord>> oldRecordList) throws QException run preUpdate method over all sub-customizers- Specified by:
preUpdatein interfaceTableCustomizerInterface- Throws:
QException
-
postUpdate
public List<QRecord> postUpdate(UpdateInput updateInput, List<QRecord> records, Optional<List<QRecord>> oldRecordList) throws QException run postUpdate method over all sub-customizers- Specified by:
postUpdatein interfaceTableCustomizerInterface- Throws:
QException
-
preDelete
public List<QRecord> preDelete(DeleteInput deleteInput, List<QRecord> records, boolean isPreview) throws QException run preDelete method over all sub-customizers- Specified by:
preDeletein interfaceTableCustomizerInterface- Throws:
QException
-
postDelete
run postDelete method over all sub-customizers- Specified by:
postDeletein interfaceTableCustomizerInterface- Throws:
QException
-