use of org.kuali.kfs.module.ld.businessobject.LaborBenefitRateCategory in project cu-kfs by CU-CommunityApps.
the class AccountExtensionRule method checkLaborBenefitCategoryCode.
// TODO This should no longer be required as laborBenefitCategoryCode is now in the base table and add to
// the list of fields the have existence checks.
@SuppressWarnings("deprecation")
protected boolean checkLaborBenefitCategoryCode(MaintenanceDocument document) {
boolean success = true;
String laborBenefitCategoryCode = newAccount.getLaborBenefitRateCategoryCode();
BusinessObjectService bos = SpringContext.getBean(BusinessObjectService.class);
// no validation is performed.
if (!StringUtils.isBlank(laborBenefitCategoryCode)) {
Map<String, Object> fieldValues = new HashMap<String, Object>();
fieldValues.put("laborBenefitRateCategoryCode", laborBenefitCategoryCode);
Collection<LaborBenefitRateCategory> retVals = bos.findMatching(LaborBenefitRateCategory.class, fieldValues);
if (retVals.isEmpty()) {
success = false;
putFieldError("laborBenefitRateCategoryCode", KFSKeyConstants.ERROR_EXISTENCE, " Labor Benefit Rate Category Code " + laborBenefitCategoryCode);
}
}
return success;
}
Aggregations