Пример #1
0
 private String getFundingSourceNameForType(int sourceType, String sourceCode) {
   String name = null;
   if (sourceType == 1) {
     Sponsor sponsor =
         getBusinessObjectService().findBySinglePrimaryKey(Sponsor.class, sourceCode);
     if (sponsor != null) {
       name = sponsor.getSponsorName();
     }
   } else if (sourceType == 2) {
     Unit unit = getBusinessObjectService().findBySinglePrimaryKey(Unit.class, sourceCode);
     if (unit != null) {
       name = unit.getUnitName();
     }
   } else {
     name = sourceCode;
   }
   return name;
 }
Пример #2
0
 public String getUnitName() {
   return unit != null ? unit.getUnitName() : null;
 }