use of org.kuali.rice.location.framework.campus.CampusEbo in project cu-kfs by CU-CommunityApps.
the class DisbursementVoucherBatchDefault method getCampus.
/**
* Gets the campus attribute.
*
* @return Returns the campus.
*/
public CampusEbo getCampus() {
if (StringUtils.isBlank(campusCode)) {
campus = null;
} else {
if (campus == null || !StringUtils.equals(campus.getCode(), campusCode)) {
ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CampusEbo.class);
if (moduleService != null) {
Map<String, Object> keys = new HashMap<String, Object>(1);
keys.put(LocationConstants.PrimaryKeyConstants.CODE, campusCode);
campus = moduleService.getExternalizableBusinessObject(CampusEbo.class, keys);
} else {
throw new RuntimeException("CONFIGURATION ERROR: No responsible module found for EBO class. Unable to proceed.");
}
}
}
return campus;
}
use of org.kuali.rice.location.framework.campus.CampusEbo in project cu-kfs by CU-CommunityApps.
the class Account method getAccountPhysicalCampus.
/**
* Gets the accountPhysicalCampus attribute.
*
* @return Returns the accountPhysicalCampus
*/
@Override
public CampusEbo getAccountPhysicalCampus() {
if (StringUtils.isBlank(accountPhysicalCampusCode)) {
accountPhysicalCampus = null;
} else {
if (accountPhysicalCampus == null || !StringUtils.equals(accountPhysicalCampus.getCode(), accountPhysicalCampusCode)) {
ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CampusEbo.class);
if (moduleService != null) {
Map<String, Object> keys = new HashMap<String, Object>(1);
keys.put(LocationConstants.PrimaryKeyConstants.CODE, accountPhysicalCampusCode);
accountPhysicalCampus = moduleService.getExternalizableBusinessObject(CampusEbo.class, keys);
} else {
throw new RuntimeException("CONFIGURATION ERROR: No responsible module found for EBO class. Unable to proceed.");
}
}
}
return accountPhysicalCampus;
}
Aggregations