private boolean checkIfInvestigationIsInBreachedList(Integer investigationId) { if(investigationId == null || form.getLocalContext().getBreachedInvestigations() == null) return false; Iterator<BreachedInvestigationsVo> list = form.getLocalContext().getBreachedInvestigations().iterator();//WDEV-16762 while(list.hasNext()) { BreachedInvestigationsVo item = list.next();//WDEV-16762 if(item == null || item.getInvestigationId() == null) continue; if(item.getInvestigationId().equals(investigationId))//WDEV-16762 return true; } return false; }
private boolean breachedInvestigationIsInRefusedList(BreachedInvestigationsVo breachedInvestigationsVo) { if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0) return false; if(breachedInvestigationsVo == null) return false; for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation()) { if(refusedInv == null || refusedInv.getID_Investigation() == null) continue; if(refusedInv.getID_Investigation().equals(breachedInvestigationsVo.getInvestigationId()) || (refusedInv.getID_Investigation().equals(breachedInvestigationsVo.getParentId()))) return true; } return false; }
private boolean isInvestigationInBreachedList(Investigation inv, BreachedInvestigationsVoCollection breachedInvestigations) // WDEV-16762 { if(inv == null || breachedInvestigations == null) return false; Iterator<BreachedInvestigationsVo> list = breachedInvestigations.iterator();// WDEV-16762 while(list.hasNext()) { BreachedInvestigationsVo item = list.next();// WDEV-16762 if(item == null || item.getInvestigationId() == null) continue; if(item.getInvestigationId().equals(inv.getId()))// WDEV-16762 return true; } return false; }
private ReOrderPeriodMessageVoCollection getDistinctListOfMessages(ReOrderPeriodMessageVoCollection voCollMessages) { ReOrderPeriodMessageVoCollection collMessages = new ReOrderPeriodMessageVoCollection(); HashMap<String, ReOrderPeriodMessageVo> map = new HashMap<String, ReOrderPeriodMessageVo>(); for(int i=0;i<voCollMessages.size();i++) { if(!map.containsKey(voCollMessages.get(i).getItemName())) map.put(voCollMessages.get(i).getItemName(), voCollMessages.get(i)); } for (ReOrderPeriodMessageVo element : map.values()) { collMessages.add(element); //WDEV-16624 if(form.getLocalContext().getBreachedInvestigations() == null) form.getLocalContext().setBreachedInvestigations(new BreachedInvestigationsVoCollection());//WDEV-16762 //WDEV-16762 BreachedInvestigationsVo breached = new BreachedInvestigationsVo(); breached.setInvestigationId(element.getInvestigationId()); breached.setParentId(element.getParentId()); form.getLocalContext().getBreachedInvestigations().add(breached);//WDEV-16624, WDEV-16762 } return collMessages; }