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
-
Method Summary
Modifier and TypeMethodDescription@Nullable Void
doRun
(Entity lecturerBooking, CommandContext commandContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.OptionalTask
run
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.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:
doRun
in interfaceOptionalTask<Entity,
Void> - Throws:
PersistException
InterruptedException
-