Class BTMaterialInsert
java.lang.Object
overit.geocall.bl.BusinessTask<MaterialInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<MaterialInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<MaterialInsertEvent>
overit.geocallapp.wfm.core.bl.material.task.BTMaterialInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(MaterialInsertEvent.class)
public class BTMaterialInsert
extends ValidPermissionBusinessTask<MaterialInsertEvent>
Business task in order to insert a
When the
BOMaterial. When the
MaterialInsertEvent is launched
the BT notices the call and inserts the BOMaterial basing on the event's input. - Since:
- 13.0
- See Also:
- GCApi:
- task
-
Field Summary
FieldsFields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(MaterialInsertEvent event, PoolKit pk) Inserts the givenBOMaterialand writes the newly generated id into the event journal..protected Longinsert(BOMaterial boMaterial, PoolKit poolKit) Performs the insertion of the givenBOMaterialtogether with the correspondingBOMaterialHistory.booleanChecks if the execution valid.voidvalidateData(BOMaterial material, PoolKit pk) Validates the material data before the insertion.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
-
Field Details
-
helper
-
-
Constructor Details
-
BTMaterialInsert
public BTMaterialInsert()
-
-
Method Details
-
execute
protected void execute(MaterialInsertEvent event, PoolKit pk) throws DAException, DAValidateException Inserts the givenBOMaterialand writes the newly generated id into the event journal..- Specified by:
executein classValidExecutionBusinessTask<MaterialInsertEvent>- Parameters:
event- theMaterialInsertEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
insert
protected Long insert(BOMaterial boMaterial, PoolKit poolKit) throws DAException, DAValidateException Performs the insertion of the givenBOMaterialtogether with the correspondingBOMaterialHistory.- Parameters:
boMaterial- theBOMaterialto insertpoolKit- thePoolKit- Returns:
- the id of the inserted
BOMaterial - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution valid.- Returns:
- true, if successful
-
validateData
Validates the material data before the insertion.- Parameters:
material- the current materialpk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-