Class BTSkillDivisionSkillGroupedRelationUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<SkillDivisionSkillGroupedRelationUpdateEvent>
overit.geocallapp.wfm.skills.bl.division.skill.task.BTSkillDivisionSkillGroupedRelationUpdate
- All Implemented Interfaces:
Serializable,Tool
@Event(SkillDivisionSkillGroupedRelationUpdateEvent.class)
@Permission("fsm.core.skill.edit")
public class BTSkillDivisionSkillGroupedRelationUpdate
extends BusinessTask<SkillDivisionSkillGroupedRelationUpdateEvent>
Business task in order to update a
When the
The process is divided in two different steps:
SkillDivisionSkillGroupedRelation, i.e. a group of BOSkillDivisionSkill. When the
SkillDivisionSkillGroupedRelationUpdateEvent is launched
the BT notices the call and inserts as many BOSkillDivisionSkill as indicated in the given SkillDivisionSkillGroupedRelation. The process is divided in two different steps:
- if the input cardinality is lesser than the saved one, we delete a number of relations equals to the difference
- if the input cardinality is greater than the saved one, we insert a number of relations equals to the difference
Error Code:
- Since:
- 17.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(SkillDivisionSkillGroupedRelationUpdateEvent event, PoolKit poolKit) Inserts/deletes a number ofBOSkillDivisionSkillbasing on the cardinality specified in the input.protected voiddeleteRelation(Long id, PoolKit poolKit) Deletes the givenBOSkillDivisionSkillrelation.protected voidinsertHistory(Long skillDivision, PoolKit poolKit) Insert the history for all the currently savedBOSkillDivisionSkillfor the specificBOSkillDivision.protected voidinsertRelation(BOSkillDivisionSkill relation, PoolKit poolKit) Insert the givenBOSkillDivisionSkillrelation.protected List<BOSkillDivisionSkill> loadExistingRelations(SkillDivisionSkillGroupedRelation relation, PoolKit poolKit) Loads all the existingBOSkillDivisionSkillrelations related to the given skill and skill division.protected voidvalidate(SkillDivisionSkillGroupedRelation relation, PoolKit poolKit) Validates the data before the update.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTSkillDivisionSkillGroupedRelationUpdate
public BTSkillDivisionSkillGroupedRelationUpdate()
-
-
Method Details
-
body
protected void body(SkillDivisionSkillGroupedRelationUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Inserts/deletes a number ofBOSkillDivisionSkillbasing on the cardinality specified in the input.- Specified by:
bodyin classBusinessTask<SkillDivisionSkillGroupedRelationUpdateEvent>- Parameters:
event- theSkillDivisionSkillGroupedRelationUpdateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
protected void validate(SkillDivisionSkillGroupedRelation relation, PoolKit poolKit) throws DAValidateException, DAException Validates the data before the update.- Parameters:
relation- theSkillDivisionSkillGroupedRelationpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadExistingRelations
protected List<BOSkillDivisionSkill> loadExistingRelations(SkillDivisionSkillGroupedRelation relation, PoolKit poolKit) throws DAValidateException, DAException Loads all the existingBOSkillDivisionSkillrelations related to the given skill and skill division.- Parameters:
relation- theSkillDivisionSkillGroupedRelationcontaining the skill and skill divisionpoolKit- thePoolKit- Returns:
- a list of loaded
BOSkillDivisionSkill - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
deleteRelation
Deletes the givenBOSkillDivisionSkillrelation.- Parameters:
id- the id of theBOSkillDivisionSkillto deletepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
insertRelation
protected void insertRelation(BOSkillDivisionSkill relation, PoolKit poolKit) throws DAValidateException, DAException Insert the givenBOSkillDivisionSkillrelation.- Parameters:
relation- theBOSkillDivisionSkillto insertpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
insertHistory
protected void insertHistory(Long skillDivision, PoolKit poolKit) throws DAValidateException, DAException Insert the history for all the currently savedBOSkillDivisionSkillfor the specificBOSkillDivision.- Parameters:
skillDivision- the skill divisionpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-