public WorklistContactType getWorklistContactTypeByExternalCode(ContactType contactType) { if (contactType == null) return null; LookupInstVo instContactType = LookupHelper.getContactTypeInstance(getLookupService(), contactType.getId()); LookupInstVo instMap = getMappings(instContactType); LookupMappingVoCollection mapColl = instMap.getMappings(); for (int j = 0; j < mapColl.size(); j++) { LookupMappingVo valueObject = mapColl.get(j); TaxonomyType taxonomyType = getExtSystemInstance(valueObject.getExtSystem()); if (taxonomyType.equals(TaxonomyType.WORKLIST_MAPPING)) { Integer codeVal = Integer.valueOf(valueObject.getExtCode()); WorklistContactTypeCollection collWorklistContactType = LookupHelper.getWorklistContactType(getLookupService()); for (int i = 0; i < collWorklistContactType.size(); i++) { if (codeVal == collWorklistContactType.get(i).getId()) return collWorklistContactType.get(i); } } } return null; }
public WorklistContactType getWorklistContactTypeByExternalCode(ContactType contactType) { if (contactType == null) return null; LookupInstVo instContactType = LookupHelper.getContactTypeInstance(getLookupService(), contactType.getId()); LookupInstVo instMap = getMappings(instContactType); LookupMappingVoCollection mapColl = instMap.getMappings(); for (int j = 0; j < mapColl.size(); j++) { LookupMappingVo valueObject = mapColl.get(j); TaxonomyType taxonomyType = getExtSystemInstance(valueObject.getExtSystem()); if(taxonomyType.equals(TaxonomyType.WORKLIST_MAPPING)){ Integer codeVal = Integer.valueOf(valueObject.getExtCode()); WorklistContactTypeCollection collWorklistContactType = LookupHelper.getWorklistContactType(getLookupService()); for(int i=0;i<collWorklistContactType.size();i++) { if(codeVal == collWorklistContactType.get(i).getId()) return collWorklistContactType.get(i); } } } return null; }