Class BTWorkCycleInsert
java.lang.Object
overit.geocall.bl.BusinessTask<WorkCycleInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WorkCycleInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WorkCycleInsertEvent>
overit.geocallapp.wfm.workorders.bl.workcycle.task.BTWorkCycleInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WorkCycleInsertEvent.class)
public class BTWorkCycleInsert
extends ValidPermissionBusinessTask<WorkCycleInsertEvent>
Business task in order to insert a
BOWorkCycle. Required fields:
- code
- description
- work order type
Permission:
Error code:
- Since:
- 18.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 voidafterInsert(BOWorkCycle workCycle, PoolKit pk) Actions to perform after the insertion.protected voidcheckUniqueCode(BOWorkCycle workCycle, PoolKit poolKit) Check if there are others work cycle with the same code.protected voidexecute(WorkCycleInsertEvent event, PoolKit poolKit) Inserts the givenBOWorkCycleand writes the newly generated id into the event journal.booleanDetermines whether the current state is valid for execution.protected voidvalidate(BOWorkCycle workCycle, PoolKit poolKit) Validates the 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
-
Constructor Details
-
BTWorkCycleInsert
public BTWorkCycleInsert()
-
-
Method Details
-
execute
protected void execute(WorkCycleInsertEvent event, PoolKit poolKit) throws DAException, DAValidateException Inserts the givenBOWorkCycleand writes the newly generated id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<WorkCycleInsertEvent>- Parameters:
event- theWorkCycleInsertEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
protected void validate(BOWorkCycle workCycle, PoolKit poolKit) throws DAValidateException, DAException Validates the data before the insertion.- Parameters:
workCycle- theBOWorkCyclecontaining the new values- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkUniqueCode
protected void checkUniqueCode(BOWorkCycle workCycle, PoolKit poolKit) throws DAValidateException, DAException Check if there are others work cycle with the same code.- Parameters:
workCycle- theBOWorkCyclepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Returns:
- true if execution is valid, false otherwise
-
afterInsert
Actions to perform after the insertion.- Parameters:
workCycle- theBOWorkCyclepk- thePoolKit
-