use of org.kuali.kfs.module.cg.businessobject.Agency in project cu-kfs by CU-CommunityApps.
the class ezraUpdateSponsorImplTest method agencyInKfs.
public boolean agencyInKfs(List<Sponsor> sponsors) {
Agency agency = null;
do {
Map fields = new HashMap();
Sponsor sponsor = sponsors.get(agencyCount);
fields.clear();
Long sponsorId = sponsor.getSponsorId();
fields.put("agencyNumber", sponsorId.toString());
agency = (Agency) businessObjectService.findByPrimaryKey(Agency.class, fields);
agencyCount++;
} while ((ObjectUtils.isNull(agency)) && (agencyCount < sponsors.size()));
agencyNumber = agencyCount - 1;
agencyCount = 0;
if (ObjectUtils.isNull(agency)) {
return false;
} else {
return true;
}
}
Aggregations