Class SavedReportTableCustomizer
java.lang.Object
com.kingsrook.qqq.backend.core.model.savedreports.SavedReportTableCustomizer
- 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 TypeMethodDescriptionpreDelete
(DeleteInput deleteInput, List<QRecord> records, boolean isPreview) Custom actions before a delete 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.static void
validateOwner
(List<QRecord> records, String tableName, String verb) 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, postDelete, postInsert, postInsertOrUpdate, postQuery, postUpdate, preInsertOrUpdate, whenToRunPreInsert
-
Constructor Details
-
SavedReportTableCustomizer
public SavedReportTableCustomizer()
-
-
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
-
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
-
preDelete
public List<QRecord> preDelete(DeleteInput deleteInput, List<QRecord> records, boolean isPreview) throws QException Description copied from interface:TableCustomizerInterface
Custom actions before a delete takes place. It's important for implementations to be aware of the isPreview param, 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 (which the DeleteAction would look up based on the inputs to the delete action), and look at their values: - possibly adding Errors (`addError`) or Warnings (`addWarning`) to the records - possibly throwing an exception - if you really don't want the delete operation to continue. - doing "whatever else" you may want to do. - returning the list of records (can be the input list) - this is how errors and warnings are propagated to the DeleteAction. Note that any records with an error will NOT proceed to the backend's delete interface - but those with warnings will.- Specified by:
preDelete
in interfaceTableCustomizerInterface
- Throws:
QException
-
validateOwner
-