예제 #1
0
 /** This method is for refreshing References of Origin Entry */
 protected void refreshOriginEntryReferences(OriginEntryFull originEntry) {
   Map<String, Class> referenceClasses =
       persistenceStructureService.listReferenceObjectFields(originEntry.getClass());
   for (String reference : referenceClasses.keySet()) {
     if (KFSPropertyConstants.PROJECT.equals(reference)) {
       if (KFSConstants.getDashProjectCode().equals(originEntry.getProjectCode())) {
         originEntry.setProject(null);
       } else {
         persistenceService.retrieveReferenceObject(originEntry, reference);
       }
     } else if (KFSPropertyConstants.FINANCIAL_SUB_OBJECT.equals(reference)) {
       if (KFSConstants.getDashFinancialSubObjectCode()
           .equals(originEntry.getFinancialSubObjectCode())) {
         originEntry.setFinancialSubObject(null);
       } else {
         persistenceService.retrieveReferenceObject(originEntry, reference);
       }
     } else if (KFSPropertyConstants.SUB_ACCOUNT.equals(reference)) {
       if (KFSConstants.getDashSubAccountNumber().equals(originEntry.getSubAccountNumber())) {
         originEntry.setSubAccount(null);
       } else {
         persistenceService.retrieveReferenceObject(originEntry, reference);
       }
     } else {
       persistenceService.retrieveReferenceObject(originEntry, reference);
     }
   }
 }
 @Override
 public void retrieveReferenceObject(Object persistableObject, String referenceObjectName) {
   persistenceService.retrieveReferenceObject(persistableObject, referenceObjectName);
   synchronizeEclipseLinkWeavings(persistableObject, referenceObjectName);
 }