Class BTCatalogGroupInsert
java.lang.Object
overit.geocall.bl.BusinessTask<CatalogGroupInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CatalogGroupInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CatalogGroupInsertEvent>
overit.geocallapp.wfm.catalogs.bl.cataloggroup.task.BTCatalogGroupInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CatalogGroupInsertEvent.class)
public class BTCatalogGroupInsert
extends ValidPermissionBusinessTask<CatalogGroupInsertEvent>
Business task in order to insert a
When the
BOCatalogGroup. When the
CatalogGroupInsertEvent is launched the BT notices the call and
inserts the BOCatalogGroup basing on the event's input. - 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 voidActions to perform after the insertion.protected voidcheckUnique(BOCatalogGroup catalogGroup, PoolKit pk) Checks if the given catalog group has a unique code.protected voidexecute(CatalogGroupInsertEvent event, PoolKit pk) Inserts theBOCatalogGroupobject and writes the newly generated id into the event journal.booleanDetermines whether the current state is valid for execution.protected voidvalidateInput(BOCatalogGroup catalogGroup, PoolKit pk) Validates theBOCatalogGroupobject 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
-
BTCatalogGroupInsert
public BTCatalogGroupInsert()
-
-
Method Details
-
execute
protected void execute(CatalogGroupInsertEvent event, PoolKit pk) throws DAException, DAValidateException Inserts theBOCatalogGroupobject and writes the newly generated id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<CatalogGroupInsertEvent>- Parameters:
event- theCatalogGroupInsertEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validateInput
protected void validateInput(BOCatalogGroup catalogGroup, PoolKit pk) throws DAValidateException, DAException Validates theBOCatalogGroupobject data before its insertion.- Parameters:
catalogGroup- theBOCatalogGroupobject to be insertedpk- thePoolKitpk- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
checkUnique
protected void checkUnique(BOCatalogGroup catalogGroup, PoolKit pk) throws DAValidateException, DAException Checks if the given catalog group has a unique code.- Parameters:
catalogGroup- the currentBOCatalogGrouppk- 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
protected void afterInsert()Actions to perform after the insertion.
-