Class InheritIncomeTask
java.lang.Object
ch.tocco.nice2.optional.salary.api.tasks.InheritIncomeTask
- All Implemented Interfaces:
OptionalTask<Entity,Void>, PersistTask<Entity, Void>
if the field 'income_per_hour' on the given Lecturer_booking
Entity is null
and the Lecturer_booking has a related salary Entity, the field 'income_per_hour'
of the Salary will be copied to the field 'income_per_hour' on the Lecturer_booking.
You may force overwriting of the 'income_per_hour' field by using the constructor InheritIncomeTask(boolean)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable VoiddoRun(Entity lecturerBooking, CommandContext commandContext) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface OptionalTask
runMethods inherited from interface PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Constructor Details
-
InheritIncomeTask
public InheritIncomeTask() -
InheritIncomeTask
public InheritIncomeTask(boolean overwrite)
-
-
Method Details
-
doRun
@Nullable public @Nullable Void doRun(Entity lecturerBooking, CommandContext commandContext) throws PersistException, InterruptedException - Specified by:
doRunin interfaceOptionalTask<Entity,Void> - Throws:
PersistExceptionInterruptedException
-