Class BTOutcomeReasonEncodedNoteInsert
java.lang.Object
overit.geocall.bl.BusinessTask<OutcomeReasonEncodedNoteInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<OutcomeReasonEncodedNoteInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<OutcomeReasonEncodedNoteInsertEvent>
overit.geocallapp.wfm.execution.bl.outcome.reason.encodednote.task.BTOutcomeReasonEncodedNoteInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(OutcomeReasonEncodedNoteInsertEvent.class)
public class BTOutcomeReasonEncodedNoteInsert
extends ValidPermissionBusinessTask<OutcomeReasonEncodedNoteInsertEvent>
Business task in order to insert a
Required fields:
BOOutcomeReasonEncodedNote.Required fields:
- encodedNote
- reason
Error Code:
Codes.PROPERTY_REQUIRED: Property requiredCodes.OutcomeReasonEncodedNote.CANNOT_INSERT_RELATION: Cannot insert outcome reason encoded note. There is already a relationship between outcome reason and encoded note.
- 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 voidcheckUniqueRelation(Long encodedNote, Long reason, PoolKit pk) Check if the relation between the given outcome reason and encoded note already exists.protected voidexecute(OutcomeReasonEncodedNoteInsertEvent event, PoolKit pk) Writes the inserted outcome reason encoded note into the event journal.booleanDetermines whether the current state is valid for execution.protected voidvalidate(BOOutcomeReasonEncodedNote outcomeReasonEncodedNote, PoolKit pk) Checks if the insertion is possible by performing some validations on the givenBOOutcomeReasonEncodedNoteMethods 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
-
BTOutcomeReasonEncodedNoteInsert
public BTOutcomeReasonEncodedNoteInsert()
-
-
Method Details
-
execute
protected void execute(OutcomeReasonEncodedNoteInsertEvent event, PoolKit pk) throws DAException, DAValidateException Writes the inserted outcome reason encoded note into the event journal.- Specified by:
executein classValidExecutionBusinessTask<OutcomeReasonEncodedNoteInsertEvent>- Parameters:
event- theOutcomeReasonEncodedNoteInsertEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
protected void validate(BOOutcomeReasonEncodedNote outcomeReasonEncodedNote, PoolKit pk) throws DAValidateException, DAException Checks if the insertion is possible by performing some validations on the givenBOOutcomeReasonEncodedNote- Parameters:
outcomeReasonEncodedNote- the outcome reason encoded notepk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkUniqueRelation
protected void checkUniqueRelation(Long encodedNote, Long reason, PoolKit pk) throws DAValidateException, DAException Check if the relation between the given outcome reason and encoded note already exists.- Parameters:
encodedNote- the encoded notereason- the outcome reasonpk- 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
-