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 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.void
initialize
(QCodeReference codeReference) When this class is instantiated by the QCodeLoader, initialize the sub-customizer objects.static QCodeReferenceWithProperties
of
(QCodeReference... codeReferences) Factory method that builds aQCodeReferenceWithProperties
that 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, wait
Methods 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 aQCodeReferenceWithProperties
that 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 moreobjects
to 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:
initialize
in interfaceInitializableViaCodeReference
-
postQuery
public List<QRecord> postQuery(QueryOrGetInputInterface queryInput, List<QRecord> records) throws QException run postQuery method over all sub-customizers- Specified by:
postQuery
in 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:
preInsert
in interfaceTableCustomizerInterface
- Throws:
QException
-
postInsert
run postInsert method over all sub-customizers- 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 run preUpdate method over all sub-customizers- Specified by:
preUpdate
in 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:
postUpdate
in 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:
preDelete
in interfaceTableCustomizerInterface
- Throws:
QException
-
postDelete
run postDelete method over all sub-customizers- Specified by:
postDelete
in interfaceTableCustomizerInterface
- Throws:
QException
-