Search in sources :

Example 6 with Agency

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;
    }
}
Also used : Agency(org.kuali.kfs.module.cg.businessobject.Agency) HashMap(java.util.HashMap) Sponsor(edu.cornell.kfs.module.ezra.businessobject.Sponsor) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

Agency (org.kuali.kfs.module.cg.businessobject.Agency)6 Sponsor (edu.cornell.kfs.module.ezra.businessobject.Sponsor)4 HashMap (java.util.HashMap)3 Map (java.util.Map)3 EzraProject (edu.cornell.kfs.module.ezra.businessobject.EzraProject)1 Date (java.sql.Date)1 Calendar (java.util.Calendar)1 CFDA (org.kuali.kfs.module.cg.businessobject.CFDA)1 Proposal (org.kuali.kfs.module.cg.businessobject.Proposal)1 ProposalOrganization (org.kuali.kfs.module.cg.businessobject.ProposalOrganization)1 ProposalProjectDirector (org.kuali.kfs.module.cg.businessobject.ProposalProjectDirector)1