Class BundleEntitiesAggregate
java.lang.Object
overit.geocallapp.wfm.core.bl.bundler.BundleEntitiesAggregate
- All Implemented Interfaces:
Serializable
An aggregate of all the entities that are strictly related and useful for a
Bundle.- Since:
- 10.1
- See Also:
- GCApi:
- bo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActivity(BOActivity activity) Adds the givenBOActivityto the bundle operation activity list, only if it is not already present.voidaddAddress(BOAddress address) Adds the givenBOAddressto the bundle addresses list, only if it is not already present.voidvoidaddSkillDivision(BOSkillDivision skillDivision) Adds the givenBOSkillDivisionto the collection of the ones related to the currentBundle.voidaddSkillDivisionSkills(Long skillDivisionId, List<BOSkillDivisionSkill> skillDivisionSkillList) Adds the givenBOSkillDivisionSkilllist to the collection of the ones related to the givenBOSkillDivision.voidaddWorkOrder(WorkOrder workOrder) Adds the givenWorkOrderto the bundle work order list, only if it is not already present.getActivityByWorkOrderOperation(Long woOperationId) Returns theBOOperationActivityrelated to the givenBOWorkOrderOperationid.getAddressByWorkOrderOperation(Long woOperationId) Returns theBOAddressrelated to the givenBOWorkOrderOperationid.Returns the list of the relatedBOAddress.getAgendaByWorkOrderOperation(Long woOperationId) Returns theBOAgendarelated to the givenBOWorkOrderOperationid.Returns the list ofBOAgendaResourcerelated to the bundle'sInterventiongetAgendaResourcesByAgenda(Long agendaId) Returns theBOAgendaResourceretrieving it by the givenBOWorkOrderOperationid.getAppointmentByWorkOrderOperation(Long woOperationId) Returns theBOAppointmentrelated to the givenBOWorkOrderOperationid.Returns the list ofBOAppointmentthat are related to the bundle'sBOWorkOrderOperations.Returns theBundleassociated to this aggregate.Returns the insert user information.Returns the list ofInterventionthat are related to theBOBundleOperations.Returns the list of all theBOWorkOrderOperationrelated to the currentBundleand not inBOBundleOperationStatus.Values.CANCELLEDstate.Returns the list ofBOActivitythat are related to the bundle'sBOWorkOrderOperations.getSkillDivision(Long skillDivisionId) Returns theBOSkillDivisionwith the given id searching it from the ones related to the currentBundle.Returns the collection ofBOSkillDivisionthat are related to the currentBundle.Returns the map between the ids and theBOSkillDivisionrelated to the currentBundle.Returns the map between the skill division ids and theBOSkillDivisionSkillrelated to theBOBundleSkillDivision.getSkillDivisionSkills(Long skillDivisionId) Returns theBOSkillDivisionSkilllist related to the given skill division id.getWorkOrderByWorkOrderOperation(Long woOperationId) Returns theWorkOrderrelated to the givenBOWorkOrderOperationidReturns theBOWorkOrderOperationby the given id, searching it through the relatedWorkOrderlist.Returns the list of all theBOWorkOrderOperations related to the currentBundle.Returns the list of the relatedWorkOrder.voidsetAddresses(List<BOAddress> addresses) Sets the list of relatedBOAddress.voidsetAgendaResources(List<BOAgendaResource> agendaResources) Sets the list ofBOAgendaResourcefor the bundle.voidSets theBundleto the given one.voidsetInsertUser(BOUser user) Sets the bundle insert user.voidsetInterventions(List<Intervention> interventions) Sets the list ofInterventionthat are related to theBOBundleOperations.voidsetOperationActivities(List<BOActivity> operationActivities) Sets the list ofBOActivitythat are related to the bundle'sBOWorkOrderOperations.voidsetWorkOrders(List<WorkOrder> workOrders) Sets the list of relatedWorkOrder.
-
Constructor Details
-
BundleEntitiesAggregate
public BundleEntitiesAggregate()Instantiates a new bundle aggregate.
-
-
Method Details
-
getBundle
Returns theBundleassociated to this aggregate.- Returns:
- the current
Bundle
-
setBundle
Sets theBundleto the given one.- Parameters:
bundle- the currentBundle
-
getWorkOrderOperationById
Returns theBOWorkOrderOperationby the given id, searching it through the relatedWorkOrderlist.- Parameters:
id- the id of the searchedBOWorkOrderOperation- Returns:
- the corresponding
BOWorkOrderOperation, null otherwise
-
getWorkOrderOperations
Returns the list of all theBOWorkOrderOperations related to the currentBundle.- Returns:
- a list of
BOWorkOrderOperation
-
getNotCancelledWorkOrderOperations
Returns the list of all theBOWorkOrderOperationrelated to the currentBundleand not inBOBundleOperationStatus.Values.CANCELLEDstate.- Returns:
- a list of
BOWorkOrderOperation
-
getWorkOrderByWorkOrderOperation
Returns theWorkOrderrelated to the givenBOWorkOrderOperationid- Parameters:
woOperationId- theBOWorkOrderOperationid- Returns:
- the corresponding
WorkOrder
-
addWorkOrder
Adds the givenWorkOrderto the bundle work order list, only if it is not already present.- Parameters:
workOrder- theWorkOrderto add
-
getWorkOrders
Returns the list of the relatedWorkOrder.- Returns:
- a list of
WorkOrder
-
setWorkOrders
Sets the list of relatedWorkOrder.- Parameters:
workOrders- the list ofWorkOrder
-
getInsertUser
Returns the insert user information.- Returns:
- the bundle insert user
-
setInsertUser
Sets the bundle insert user.- Parameters:
user- the bundle insert user
-
getAddresses
Returns the list of the relatedBOAddress.- Returns:
- a list of
BOAddress
-
setAddresses
Sets the list of relatedBOAddress.- Parameters:
addresses- the list ofBOAddress
-
addAddress
Adds the givenBOAddressto the bundle addresses list, only if it is not already present.- Parameters:
address- theBOAddressto add
-
getAddressByWorkOrderOperation
Returns theBOAddressrelated to the givenBOWorkOrderOperationid.- Parameters:
woOperationId- theBOWorkOrderOperationid- Returns:
- the corresponding
BOAddress
-
getOperationActivities
Returns the list ofBOActivitythat are related to the bundle'sBOWorkOrderOperations.- Returns:
- a list of related
BOActivity
-
setOperationActivities
Sets the list ofBOActivitythat are related to the bundle'sBOWorkOrderOperations.- Parameters:
operationActivities- the list of relatedBOActivity
-
getInterventions
Returns the list ofInterventionthat are related to theBOBundleOperations.- Returns:
- a list of related
Intervention
-
setInterventions
Sets the list ofInterventionthat are related to theBOBundleOperations.- Parameters:
interventions- the list of relatedIntervention
-
getAppointments
Returns the list ofBOAppointmentthat are related to the bundle'sBOWorkOrderOperations.- Returns:
- a list of related
BOAppointment
-
getAppointmentByWorkOrderOperation
Returns theBOAppointmentrelated to the givenBOWorkOrderOperationid.- Parameters:
woOperationId- theBOWorkOrderOperationid- Returns:
- the corresponding
BOAppointment
-
getAgendaByWorkOrderOperation
Returns theBOAgendarelated to the givenBOWorkOrderOperationid. If multiple agendas are found, returns the one with the earliest start date.- Parameters:
woOperationId- theBOWorkOrderOperationid- Returns:
- the
BOAgendawith the earliest start date, ornullif none found
-
getAgendaResources
Returns the list ofBOAgendaResourcerelated to the bundle'sIntervention- Returns:
- a list of
BOAgendaResource - See Also:
-
setAgendaResources
Sets the list ofBOAgendaResourcefor the bundle.- Parameters:
agendaResources- the list ofBOAgendaResource- See Also:
-
getAgendaResourcesByAgenda
Returns theBOAgendaResourceretrieving it by the givenBOWorkOrderOperationid.- Parameters:
agendaId- the givenBOAgendaResourceid.- Returns:
- the related
BOAgendaResource
-
getActivityByWorkOrderOperation
Returns theBOOperationActivityrelated to the givenBOWorkOrderOperationid.- Parameters:
woOperationId- theBOWorkOrderOperationid- Returns:
- the corresponding
BOOperationActivity
-
addActivity
Adds the givenBOActivityto the bundle operation activity list, only if it is not already present.- Parameters:
activity- theBOActivityto add
-
getSkills
- Returns:
- the map of
BOSkilland their ids
-
getSkillCollection
- Returns:
- the collection of
BOSkill
-
getSkill
-
addSkill
- Parameters:
skill- theBOSkillto add
-
getSkillDivisions
Returns the map between the ids and theBOSkillDivisionrelated to the currentBundle.- Returns:
- the map of
BOSkillDivisionand their ids
-
getSkillDivisionCollection
Returns the collection ofBOSkillDivisionthat are related to the currentBundle.- Returns:
- the collection of
BOSkillDivision
-
getSkillDivision
Returns theBOSkillDivisionwith the given id searching it from the ones related to the currentBundle.- Parameters:
skillDivisionId- theBOSkillDivisionid- Returns:
- the corresponding
Bundle
-
addSkillDivision
Adds the givenBOSkillDivisionto the collection of the ones related to the currentBundle.- Parameters:
skillDivision- theBOSkillDivisionto add
-
getSkillDivisionSkills
Returns the map between the skill division ids and theBOSkillDivisionSkillrelated to theBOBundleSkillDivision.- Returns:
- the map of
BOSkillDivisionSkilland their skill division ids
-
getSkillDivisionSkills
Returns theBOSkillDivisionSkilllist related to the given skill division id.- Parameters:
skillDivisionId- theBOSkillDivisionid- Returns:
- the corresponding
BOSkillDivisionSkilllist
-
addSkillDivisionSkills
public void addSkillDivisionSkills(Long skillDivisionId, List<BOSkillDivisionSkill> skillDivisionSkillList) Adds the givenBOSkillDivisionSkilllist to the collection of the ones related to the givenBOSkillDivision.- Parameters:
skillDivisionId- theBOSkillDivisionidskillDivisionSkillList- theBOSkillDivisionSkilllist
-