Class BTWarehouseOperationSave
java.lang.Object
overit.geocall.bl.BusinessTask<WarehouseOperationSaveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WarehouseOperationSaveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WarehouseOperationSaveEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<WarehouseOperationSaveEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.operation.task.BTWarehouseOperationSave
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WarehouseOperationSaveEvent.class)
public class BTWarehouseOperationSave
extends BTInventoryManagement<WarehouseOperationSaveEvent>
Business task in order to save a
When the
WarehouseOperation. When the
WarehouseOperationSaveEvent is launched
the BT notices the call and inserts or updates the given WarehouseOperation basing on the event's input. - Since:
- 14.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(WarehouseOperationSaveEvent event, PoolKit poolKit) Inserts or updates the givenWarehouseOperationand its components.booleanChecks if the execution is valid.protected voidsaveHeader(WarehouseOperation warehouseOperation, PoolKit poolKit) Inserts or updates theBOWarehouseOperationHeaderof the given operation.protected voidsaveItem(WarehouseOperation warehouseOperation, WarehouseOperationItem item, PoolKit poolKit) Inserts or updates the givenWarehouseOperationItemsaving also itsBOWarehouseOperationItemSerializedMaterialrelations.protected voidsaveSerializedMaterial(BOWarehouseOperationItemSerializedMaterial material, Long itemId, PoolKit poolKit) Inserts or updates the relations between the currentWarehouseOperationItemand theBOSerializedMaterial.Methods inherited from class overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement
checkValidExecutionMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
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
-
Constructor Details
-
BTWarehouseOperationSave
public BTWarehouseOperationSave()
-
-
Method Details
-
execute
protected void execute(WarehouseOperationSaveEvent event, PoolKit poolKit) throws DAException, DAValidateException Inserts or updates the givenWarehouseOperationand its components.- Specified by:
executein classValidExecutionBusinessTask<WarehouseOperationSaveEvent>- Parameters:
event- theWarehouseOperationSaveEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
saveHeader
protected void saveHeader(WarehouseOperation warehouseOperation, PoolKit poolKit) throws DAValidateException, DAException Inserts or updates theBOWarehouseOperationHeaderof the given operation. If theBOWarehouseOperationHeaderis new, it also creates the relatedBOWarehouseOperationHeaderSource- Parameters:
warehouseOperation- the currentWarehouseOperationpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
saveItem
protected void saveItem(WarehouseOperation warehouseOperation, WarehouseOperationItem item, PoolKit poolKit) throws DAValidateException, DAException Inserts or updates the givenWarehouseOperationItemsaving also itsBOWarehouseOperationItemSerializedMaterialrelations.- Parameters:
warehouseOperation- the currentWarehouseOperationitem- theWarehouseOperationItemto savepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
saveSerializedMaterial
protected void saveSerializedMaterial(BOWarehouseOperationItemSerializedMaterial material, Long itemId, PoolKit poolKit) throws DAValidateException, DAException Inserts or updates the relations between the currentWarehouseOperationItemand theBOSerializedMaterial.- Parameters:
material- the currentBOWarehouseOperationItemSerializedMaterialrelationitemId- theWarehouseOperationItemidpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-