Class BTResourceLastGPSPositionInsert
java.lang.Object
overit.geocall.bl.BusinessTask<ResourceLastGPSPositionInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<ResourceLastGPSPositionInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<ResourceLastGPSPositionInsertEvent>
overit.geocallapp.wfm.gpstracking.bl.resource.position.last.task.BTResourceLastGPSPositionInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(ResourceLastGPSPositionInsertEvent.class)
public class BTResourceLastGPSPositionInsert
extends ValidPermissionBusinessTask<ResourceLastGPSPositionInsertEvent>
Business task in order to insert a
When the
BOResourceLastGPSPosition. When the
ResourceLastGPSPositionInsertEvent is launched the BT notices the call and
inserts the BOResourceLastGPSPosition basing on the event's input. - Since:
- 22.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 voidcheckAlreadyExists(BOResourceLastGPSPosition resourceLastPosition, PoolKit poolKit) Checks if already exists a last position for the given resource.protected voidexecute(ResourceLastGPSPositionInsertEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.booleanDetermines whether the current state is valid for execution.protected voidvalidate(BOResourceLastGPSPosition resourceLastPosition, PoolKit poolKit) Validates the data before the insert.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
-
BTResourceLastGPSPositionInsert
public BTResourceLastGPSPositionInsert()
-
-
Method Details
-
execute
protected void execute(ResourceLastGPSPositionInsertEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<ResourceLastGPSPositionInsertEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
validate
protected void validate(BOResourceLastGPSPosition resourceLastPosition, PoolKit poolKit) throws DAValidateException, DAException Validates the data before the insert.- Parameters:
resourceLastPosition- theBOResourceLastGPSPositionto insertpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkAlreadyExists
protected void checkAlreadyExists(BOResourceLastGPSPosition resourceLastPosition, PoolKit poolKit) throws DAValidateException, DAException Checks if already exists a last position for the given resource.- Parameters:
resourceLastPosition- theBOResourceLastGPSPositionto insertpoolKit- 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
-