use of edu.cornell.kfs.coa.businessobject.SubObjectCodeGlobalEdit in project cu-kfs by CU-CommunityApps.
the class SubObjectCodeGlobalEditMaintainableImpl method generateMaintenanceLocks.
/**
* This generates maintenance locks on {@link SubObjCd}
*
* @see org.kuali.kfs.kns.maintenance.Maintainable#generateMaintenanceLocks()
*/
@Override
public List<MaintenanceLock> generateMaintenanceLocks() {
// create locking rep for each combination of account and object code
List<MaintenanceLock> maintenanceLocks = new ArrayList();
SubObjectCodeGlobalEdit subObjCdGlobal = (SubObjectCodeGlobalEdit) getBusinessObject();
for (SubObjectCodeGlobalEditDetail subObjCdGlobalDetail : subObjCdGlobal.getSubObjCdGlobalEditDetails()) {
MaintenanceLock maintenanceLock = new MaintenanceLock();
maintenanceLock.setDocumentNumber(subObjCdGlobal.getDocumentNumber());
StringBuffer lockrep = new StringBuffer();
lockrep.append(SubObjectCode.class.getName() + KFSConstants.Maintenance.AFTER_CLASS_DELIM);
lockrep.append("fiscalYear" + KFSConstants.Maintenance.AFTER_FIELDNAME_DELIM);
lockrep.append(subObjCdGlobalDetail.getUniversityFiscalYear() + KFSConstants.Maintenance.AFTER_VALUE_DELIM);
lockrep.append("chartOfAccountsCode" + KFSConstants.Maintenance.AFTER_FIELDNAME_DELIM);
lockrep.append(subObjCdGlobalDetail.getChartOfAccountsCode() + KFSConstants.Maintenance.AFTER_VALUE_DELIM);
lockrep.append("accountNumber" + KFSConstants.Maintenance.AFTER_FIELDNAME_DELIM);
lockrep.append(subObjCdGlobalDetail.getAccountNumber() + KFSConstants.Maintenance.AFTER_VALUE_DELIM);
lockrep.append("financialObjectCode" + KFSConstants.Maintenance.AFTER_FIELDNAME_DELIM);
lockrep.append(subObjCdGlobalDetail.getFinancialObjectCode() + KFSConstants.Maintenance.AFTER_VALUE_DELIM);
lockrep.append("financialSubObjectCode" + KFSConstants.Maintenance.AFTER_FIELDNAME_DELIM);
lockrep.append(subObjCdGlobal.getFinancialSubObjectCode());
maintenanceLock.setLockingRepresentation(lockrep.toString());
maintenanceLocks.add(maintenanceLock);
}
return maintenanceLocks;
}
Aggregations