Class BTWarehouseOperationCenterSave
java.lang.Object
overit.geocall.bl.BusinessTask<WarehouseOperationCenterSaveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WarehouseOperationCenterSaveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WarehouseOperationCenterSaveEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<WarehouseOperationCenterSaveEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.central.operationcenter.task.BTWarehouseOperationCenterSave
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WarehouseOperationCenterSaveEvent.class)
public class BTWarehouseOperationCenterSave
extends BTInventoryManagement<WarehouseOperationCenterSaveEvent>
Business task in order to save a
When the
BOWarehouseOperationCenter relation. When the
WarehouseOperationCenterSaveEvent is launched
the BT notices the call and saves the BOWarehouseOperationCenter basing on the event's input. - Since:
- 13.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 voiddeleteRelations(List<Long> newOperationCenters, List<BOWarehouseOperationCenter> currentDbRelations, PoolKit pk) Delete the old relations by calling theWarehouseOperationCenterDeleteEvent.protected voidexecute(WarehouseOperationCenterSaveEvent event, PoolKit pk) Saves the new relations between the givenBOWarehouseand aBOOperationCenters.booleanChecks if the execution is valid.protected voidisValidNewRelations(Long warehouseId, List<Long> newOperationCenters, PoolKit pk) protected List<BOWarehouseOperationCenter> loadCurrentRelations(Long warehouse, PoolKit pk) Loads the current relations by calling theWarehouseOperationCenterSearchEvent.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
-
BTWarehouseOperationCenterSave
public BTWarehouseOperationCenterSave()
-
-
Method Details
-
execute
protected void execute(WarehouseOperationCenterSaveEvent event, PoolKit pk) throws DAException, DAValidateException Saves the new relations between the givenBOWarehouseand aBOOperationCenters. A new relation is inserted for each couple.- Specified by:
executein classValidExecutionBusinessTask<WarehouseOperationCenterSaveEvent>- Parameters:
event- the WarehouseOperationCenterSaveEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidNewRelations
protected void isValidNewRelations(Long warehouseId, List<Long> newOperationCenters, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
loadCurrentRelations
protected List<BOWarehouseOperationCenter> loadCurrentRelations(Long warehouse, PoolKit pk) throws DAValidateException, DAException Loads the current relations by calling theWarehouseOperationCenterSearchEvent.- Parameters:
warehouse- theBOWarehouseOperationCenterpk- thePoolKit- Returns:
- a list of loaded
BOWarehouseOperationCenter - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
deleteRelations
protected void deleteRelations(List<Long> newOperationCenters, List<BOWarehouseOperationCenter> currentDbRelations, PoolKit pk) throws DAValidateException, DAException Delete the old relations by calling theWarehouseOperationCenterDeleteEvent.- Parameters:
newOperationCenters- list of newBOOperationCenteridscurrentDbRelations- list ofBOWarehouseOperationCenterpk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-