コード例 #1
0
 protected boolean isInactivatingObjectCode(ObjectCode objectCode) {
   ObjectCodeService objectCodeService = SpringContext.getBean(ObjectCodeService.class);
   if (!objectCode.isActive()) {
     ObjectCode objectCodeFromDB =
         objectCodeService.getByPrimaryId(
             objectCode.getUniversityFiscalYear(),
             objectCode.getChartOfAccountsCode(),
             objectCode.getFinancialObjectCode());
     if (objectCodeFromDB != null && objectCodeFromDB.isActive()) {
       return true;
     }
   }
   return false;
 }
コード例 #2
0
 protected boolean isInactivatingObjectCode(
     ObjectCode objectCode, Map<String, Boolean> objectCodeActiveStatusCache) {
   if (!objectCode.isActive()) {
     if (Boolean.TRUE.equals(
         objectCodeActiveStatusCache.get(buildObjectCodeCachingKey(objectCode)))) {
       return true;
     }
   }
   return false;
 }
コード例 #3
0
 /**
  * @see
  *     org.kuali.kfs.module.cam.document.service.AssetPaymentService#isPaymentFinancialObjectActive(org.kuali.kfs.module.cam.businessobject.AssetPayment)
  */
 public boolean isPaymentFinancialObjectActive(AssetPayment assetPayment) {
   ObjectCode financialObjectCode = new ObjectCode();
   financialObjectCode.setUniversityFiscalYear(getUniversityDateService().getCurrentFiscalYear());
   financialObjectCode.setChartOfAccountsCode(assetPayment.getChartOfAccountsCode());
   financialObjectCode.setFinancialObjectCode(assetPayment.getFinancialObjectCode());
   financialObjectCode = (ObjectCode) getBusinessObjectService().retrieve(financialObjectCode);
   if (ObjectUtils.isNotNull(financialObjectCode)) {
     return financialObjectCode.isActive();
   }
   return false;
 }
コード例 #4
0
 protected Map<String, Boolean> buildObjectCodeActiveStatusCache(
     ObjectCodeGlobal objectCodeGlobal) {
   ObjectCodeService objectCodeService = SpringContext.getBean(ObjectCodeService.class);
   Map<String, Boolean> cache = new HashMap<String, Boolean>();
   for (ObjectCodeGlobalDetail detail : objectCodeGlobal.getObjectCodeGlobalDetails()) {
     ObjectCode objectCodeFromDB =
         objectCodeService.getByPrimaryId(
             detail.getUniversityFiscalYear(),
             detail.getChartOfAccountsCode(),
             objectCodeGlobal.getFinancialObjectCode());
     if (ObjectUtils.isNotNull(objectCodeFromDB)) {
       cache.put(
           buildObjectCodeCachingKey(objectCodeFromDB),
           Boolean.valueOf(objectCodeFromDB.isActive()));
     }
   }
   return cache;
 }