Class BTWarehouseCentralMobileSave
java.lang.Object
overit.geocall.bl.BusinessTask<WarehouseCentralMobileSaveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WarehouseCentralMobileSaveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WarehouseCentralMobileSaveEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<WarehouseCentralMobileSaveEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.centralmobile.task.BTWarehouseCentralMobileSave
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WarehouseCentralMobileSaveEvent.class)
public class BTWarehouseCentralMobileSave
extends BTInventoryManagement<WarehouseCentralMobileSaveEvent>
Business task in order to save all the given
When the
BOCentralMobileWarehouse relation. When the
WarehouseCentralMobileSaveEvent is launched
the BT notices the call and saves all the given BOCentralMobileWarehouse 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 voidcreateNewRelations(BOMobileWarehouse mobileWarehouse, Long preferred, List<Long> centralWarehouseToInsert, PoolKit pk) Creates the new relations starting from the given data.protected voiddeleteRelations(List<BOCentralMobileWarehouse> relationsToDelete, List<Long> currentCentralWarehouses, PoolKit pk) Deletes all the currently existingBOCentralMobileWarehouserelated to one of the givenBOCentralWarehouse.protected voidexecute(WarehouseCentralMobileSaveEvent event, PoolKit pk) Perform the saving of all the givenBOCentralMobileWarehouserelations.booleanChecks if the execution is valid.protected List<BOCentralMobileWarehouse> loadExistingRelations(BOMobileWarehouse mobileWarehouse, PoolKit pk) Loads the currently existingBOCentralMobileWarehouserelations.protected voidupdateExistingRelations(List<BOCentralMobileWarehouse> centralWarehouseToUpdate, Long preferred, PoolKit pk) Updates all the existing relations by setting the preferredBOCentralWarehouse.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
-
BTWarehouseCentralMobileSave
public BTWarehouseCentralMobileSave()
-
-
Method Details
-
execute
protected void execute(WarehouseCentralMobileSaveEvent event, PoolKit pk) throws DAException, DAValidateException Perform the saving of all the givenBOCentralMobileWarehouserelations.- Specified by:
executein classValidExecutionBusinessTask<WarehouseCentralMobileSaveEvent>- Parameters:
event- theWarehouseCentralMobileSaveEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadExistingRelations
protected List<BOCentralMobileWarehouse> loadExistingRelations(BOMobileWarehouse mobileWarehouse, PoolKit pk) throws DAValidateException, DAException Loads the currently existingBOCentralMobileWarehouserelations.- Parameters:
mobileWarehouse- the consideredBOMobileWarehousepk- thePoolKit- Returns:
- a list of currently existing
BOCentralMobileWarehouserelations - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception- See Also:
-
deleteRelations
protected void deleteRelations(List<BOCentralMobileWarehouse> relationsToDelete, List<Long> currentCentralWarehouses, PoolKit pk) throws DAValidateException, DAException Deletes all the currently existingBOCentralMobileWarehouserelated to one of the givenBOCentralWarehouse.- Parameters:
relationsToDelete- list ofBOCentralMobileWarehouseto deletecurrentCentralWarehouses- list ofBOCentralWarehousecurrently related to the mobile warehousepk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
createNewRelations
protected void createNewRelations(BOMobileWarehouse mobileWarehouse, Long preferred, List<Long> centralWarehouseToInsert, PoolKit pk) throws DAValidateException, DAException Creates the new relations starting from the given data.- Parameters:
mobileWarehouse- theBOMobileWarehousepreferred- the id of the preferredBOCentralWarehousecentralWarehouseToInsert- list ofBOCentralWarehouseto be related to the given mobile warehousepk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
updateExistingRelations
protected void updateExistingRelations(List<BOCentralMobileWarehouse> centralWarehouseToUpdate, Long preferred, PoolKit pk) throws DAValidateException, DAException Updates all the existing relations by setting the preferredBOCentralWarehouse.- Parameters:
centralWarehouseToUpdate- list ofBOCentralMobileWarehouserelation to updatepreferred- the preferredBOCentralWarehousepk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-