Class BTSerializedMaterialsByItemLoad
java.lang.Object
overit.geocall.bl.BusinessTask<SerializedMaterialsByItemLoadEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<SerializedMaterialsByItemLoadEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<SerializedMaterialsByItemLoadEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.transfer.request.item.serializedmaterial.task.BTSerializedMaterialsByItemLoad
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(SerializedMaterialsByItemLoadEvent.class)
public class BTSerializedMaterialsByItemLoad
extends ValidPermissionBusinessTask<SerializedMaterialsByItemLoadEvent>
Business task in order to load a list of
When the
BOTransferRequestItemSerializedMaterial
starting from the related BOTransferRequestItem id. When the
TransferRequestItemSerializedMaterialLoadEvent is launched
the BT notices the call and loads all the BOTransferRequestItemSerializedMaterial basing on the event's input. Permission:
Error Code:
Codes.GC_NOT_FOUND: The resource has not been found
- 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 voidexecute(SerializedMaterialsByItemLoadEvent event, PoolKit poolKit) Starting from the givenBOTransferRequestItemid, it loads the corresponding list of relatedBOTransferRequestItemSerializedMaterialand writes it into the event journal.booleanChecks if the execution is valid.protected List<BOTransferRequestItemSerializedMaterial> loadRelations(Long itemId, PoolKit poolKit) Loads the existing relations between the givenBOTransferRequestItemand theBOSerializedMaterials.protected List<BOSerializedMaterial> loadSerializedMaterials(Set<Long> serializedMaterials, PoolKit poolKit) Loads theBOSerializedMaterialstarting from their ids.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
-
Constructor Details
-
BTSerializedMaterialsByItemLoad
public BTSerializedMaterialsByItemLoad()
-
-
Method Details
-
execute
protected void execute(SerializedMaterialsByItemLoadEvent event, PoolKit poolKit) throws DAException, DAValidateException Starting from the givenBOTransferRequestItemid, it loads the corresponding list of relatedBOTransferRequestItemSerializedMaterialand writes it into the event journal.- Specified by:
executein classValidExecutionBusinessTask<SerializedMaterialsByItemLoadEvent>- Parameters:
event- theTransferRequestItemSerializedMaterialLoadEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadRelations
protected List<BOTransferRequestItemSerializedMaterial> loadRelations(Long itemId, PoolKit poolKit) throws DAValidateException, DAException Loads the existing relations between the givenBOTransferRequestItemand theBOSerializedMaterials.- Parameters:
itemId- theBOTransferRequestItemidpoolKit- thePoolKit- Returns:
- a list of
BOTransferRequestItemSerializedMaterialrelations - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadSerializedMaterials
protected List<BOSerializedMaterial> loadSerializedMaterials(Set<Long> serializedMaterials, PoolKit poolKit) throws DAValidateException, DAException Loads theBOSerializedMaterialstarting from their ids.- Parameters:
serializedMaterials- the set ofBOSerializedMaterialidspoolKit- thePoolKit- Returns:
- a list of loaded
BOSerializedMaterial - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-