Class BTCatalogCodeInsert
java.lang.Object
overit.geocall.bl.BusinessTask<CatalogCodeInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CatalogCodeInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CatalogCodeInsertEvent>
overit.geocallapp.wfm.catalogs.bl.catalogcode.task.BTCatalogCodeInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CatalogCodeInsertEvent.class)
public class BTCatalogCodeInsert
extends ValidPermissionBusinessTask<CatalogCodeInsertEvent>
Business task in order to insert a
When the
Error codes:
BOCatalogCode. When the
CatalogCodeInsertEvent is launched the BT notices the call and
inserts the BOCatalogCode according the event's input. Error codes:
- Since:
- 20.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 voidcheckUnique(BOCatalogCode catalogCode, PoolKit pk) Checks if the givenBOCatalogCodehas a unique code.protected voidexecute(CatalogCodeInsertEvent event, PoolKit pk) Inserts theBOCatalogCodeobject and writes the newly generated id into the event journal.booleanDetermines whether the current state is valid for execution.protected voidvalidateInput(BOCatalogCode catalogCode, PoolKit pk) Validates theBOCatalogCodeobject data before its 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
-
BTCatalogCodeInsert
public BTCatalogCodeInsert()
-
-
Method Details
-
execute
protected void execute(CatalogCodeInsertEvent event, PoolKit pk) throws DAException, DAValidateException Inserts theBOCatalogCodeobject and writes the newly generated id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<CatalogCodeInsertEvent>- Parameters:
event- theCatalogCodeInsertEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validateInput
protected void validateInput(BOCatalogCode catalogCode, PoolKit pk) throws DAValidateException, DAException Validates theBOCatalogCodeobject data before its insertion.- Parameters:
catalogCode- theBOCatalogCodeobject to be insertedpk- thePoolKitpk- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
checkUnique
protected void checkUnique(BOCatalogCode catalogCode, PoolKit pk) throws DAValidateException, DAException Checks if the givenBOCatalogCodehas a unique code.- Parameters:
catalogCode- the currentBOCatalogCodepk- 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
-