Class BTSerializedMaterialSearchByWarehouse
java.lang.Object
overit.geocall.bl.BusinessTask<SerializedMaterialSearchByWarehouseEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<SerializedMaterialSearchByWarehouseEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<SerializedMaterialSearchByWarehouseEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<SerializedMaterialSearchByWarehouseEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.serializedmaterial.task.BTSerializedMaterialSearchByWarehouse
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(SerializedMaterialSearchByWarehouseEvent.class)
public class BTSerializedMaterialSearchByWarehouse
extends BTInventoryManagement<SerializedMaterialSearchByWarehouseEvent>
Business task in order to search a
When the
If no warehouse and stock type is passed, the BT performs a basic search using
BOSerializedMaterial by the related BOWarehouse and BOStockType. When the
SerializedMaterialSearchByWarehouseEvent is launched
the BT notices the call and searches all the BOSerializedMaterial basing on the event's input. If no warehouse and stock type is passed, the BT performs a basic search using
SerializedMaterialSearchEvent
and filtering only by the given BOMaterial id.- 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(SerializedMaterialSearchByWarehouseEvent event, PoolKit poolKit) getSerializedMaterialsIds(List<BOStock> stocks, PoolKit poolKit) Starting from the given list ofBOStockit retrieves the set of related serialized materials ids.booleanChecks if the execution is valid.searchStocks(SerializedMaterialSearchByWarehouseFilter input, PoolKit poolKit) Searches the list ofBOStocks related to the input information, i.e. theBOWarehouse, theBOStockTypeand theBOMaterial.protected List<BOStockSerializedMaterial> searchStockSerializedMaterialsRelations(List<BOStock> stocks, PoolKit poolKit) Starting from the given list ofBOStockit loads the related list ofBOStockSerializedMaterial.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
-
BTSerializedMaterialSearchByWarehouse
public BTSerializedMaterialSearchByWarehouse()
-
-
Method Details
-
execute
protected void execute(SerializedMaterialSearchByWarehouseEvent event, PoolKit poolKit) throws DAException, DAValidateException Searches theBOSerializedMaterialrelated with the givenBOWarehouseandBOStockType. If one of these elements was not passed, it performs a normal search, usingSerializedMaterialSearchEventand filtering only by the givenBOMaterialid.- Specified by:
executein classValidExecutionBusinessTask<SerializedMaterialSearchByWarehouseEvent>- Parameters:
event- theSerializedMaterialSearchByWarehouseEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
getSerializedMaterialsIds
protected Set<Long> getSerializedMaterialsIds(List<BOStock> stocks, PoolKit poolKit) throws DAValidateException, DAException Starting from the given list ofBOStockit retrieves the set of related serialized materials ids.- Parameters:
stocks- list ofBOStockpoolKit- thePoolKit- Returns:
- the serialized materials ids
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
searchStockSerializedMaterialsRelations
protected List<BOStockSerializedMaterial> searchStockSerializedMaterialsRelations(List<BOStock> stocks, PoolKit poolKit) throws DAValidateException, DAException Starting from the given list ofBOStockit loads the related list ofBOStockSerializedMaterial.- Parameters:
stocks- list ofBOStockpoolKit- thePoolKit- Returns:
- a list of related
BOStockSerializedMaterial - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
searchStocks
protected List<BOStock> searchStocks(SerializedMaterialSearchByWarehouseFilter input, PoolKit poolKit) throws DAValidateException, DAException Searches the list ofBOStocks related to the input information, i.e. theBOWarehouse, theBOStockTypeand theBOMaterial.- Parameters:
input- theSerializedMaterialSearchByWarehouseFilterpoolKit- thePoolKit- Returns:
- a list of BO stock elements of type BOStock
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-