Class AbstractPostDeleteCustomizer
java.lang.Object
com.kingsrook.qqq.backend.core.actions.customizers.AbstractPostDeleteCustomizer
- All Implemented Interfaces:
TableCustomizerInterface
public abstract class AbstractPostDeleteCustomizer
extends Object
implements TableCustomizerInterface
Abstract class that a table can specify an implementation of, to provide
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 .
Note that the full deleteInput is available as a field in this class.
A future enhancement here may be to take (as fields in this class) the list of
records that the delete action marked in error - the user might want to do
something special with them (idk, try some other way to delete them?)
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.kingsrook.qqq.backend.core.actions.customizers.TableCustomizerInterface
TableCustomizerInterface.NotImplementedHereException
-
Field Summary
FieldsFields inherited from interface com.kingsrook.qqq.backend.core.actions.customizers.TableCustomizerInterface
LOG
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for deleteInputpostDelete
(DeleteInput deleteInput, List<QRecord> records) Custom actions after a delete takes place.void
setDeleteInput
(DeleteInput deleteInput) Setter for deleteInputMethods 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, postInsert, postInsertOrUpdate, postQuery, postUpdate, preDelete, preInsert, preInsertOrUpdate, preUpdate, whenToRunPreInsert
-
Field Details
-
deleteInput
-
-
Constructor Details
-
AbstractPostDeleteCustomizer
public AbstractPostDeleteCustomizer()
-
-
Method Details
-
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
-
apply
- Throws:
QException
-
getDeleteInput
Getter for deleteInput -
setDeleteInput
Setter for deleteInput
-