private boolean collectionHasInterventionTreatmentAlready(InterventionTreatmentDetailForAdviceLeafletVoCollection intreatDetCollVo, TreatmentInterventionForAdviceLeafletVo tempVo ) { if( intreatDetCollVo != null && intreatDetCollVo.size() > 0 && tempVo != null ) { for( int i = 0; i < intreatDetCollVo.size();i++ ) { InterventionTreatmentDetailForAdviceLeafletVo intreatVo = intreatDetCollVo.get(i); if( intreatVo != null && intreatVo.getTreatmentInterventionIsNotNull()) { if( intreatVo.getTreatmentIntervention().getID_TreatmentInterventionIsNotNull() && intreatVo.getTreatmentIntervention().getID_TreatmentIntervention().equals(tempVo.getID_TreatmentIntervention())) return true; } } } return false; }