Class BTMaterialAccountingSave
java.lang.Object
overit.geocall.bl.BusinessTask<MaterialAccountingSaveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<MaterialAccountingSaveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<MaterialAccountingSaveEvent>
overit.geocallapp.wfm.core.bl.schedule.intervention.material.task.BTMaterialAccountingSave
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(MaterialAccountingSaveEvent.class)
public class BTMaterialAccountingSave
extends ValidPermissionBusinessTask<MaterialAccountingSaveEvent>
Business task in order to save materials accountings.
- Since:
- 14.0
- See Also:
- GCApi:
- task
-
Field Summary
FieldsFields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(MaterialAccountingSaveEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.booleanDetermines whether the current state is valid for execution.protected InterventionloadIntervention(Long agenda, PoolKit poolKit) protected LongloadUserTeam(Long user, Date date, PoolKit poolKit) protected voidsaveAgendaMaterial(Map<BOAgendaMaterial, List<BOSerializedMaterial>> agendaMaterial, PoolKit poolKit) protected voidsaveSerializedMaterials(BOAgendaMaterial agendaMaterial, List<BOSerializedMaterial> serializedMaterials, PoolKit poolKit) protected voidsaveWorkOrderAccountedMaterial(List<BOWorkOrderOperationAccountedMaterial> accountedMaterials, PoolKit poolKit) protected voidsaveWorkOrderMaterial(List<BOWorkOrderOperationMaterial> workOrderOperationMaterials, PoolKit poolKit) Methods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
checkValidExecution, getException, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
intervention
-
workOrder
-
workOrderOperation
-
-
Constructor Details
-
BTMaterialAccountingSave
public BTMaterialAccountingSave()
-
-
Method Details
-
execute
protected void execute(MaterialAccountingSaveEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<MaterialAccountingSaveEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
loadIntervention
protected Intervention loadIntervention(Long agenda, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
saveAgendaMaterial
protected void saveAgendaMaterial(Map<BOAgendaMaterial, List<BOSerializedMaterial>> agendaMaterial, PoolKit poolKit) throws DAValidateException, DAException- Throws:
DAValidateExceptionDAException
-
saveSerializedMaterials
protected void saveSerializedMaterials(BOAgendaMaterial agendaMaterial, List<BOSerializedMaterial> serializedMaterials, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
loadUserTeam
protected Long loadUserTeam(Long user, Date date, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
saveWorkOrderAccountedMaterial
protected void saveWorkOrderAccountedMaterial(List<BOWorkOrderOperationAccountedMaterial> accountedMaterials, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
saveWorkOrderMaterial
protected void saveWorkOrderMaterial(List<BOWorkOrderOperationMaterial> workOrderOperationMaterials, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Returns:
- true if execution is valid, false otherwise
-