/** 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);
     }
   }
 }
  /**
   * @see
   *     org.kuali.kfs.module.bc.document.service.BudgetOrganizationTreeService#cleanPullup(java.lang.String)
   */
  public void cleanPullup(String principalName) {

    //        budgetConstructionDao.deleteBudgetConstructionPullupByUserId(principalName);
    budgetPullupDao.cleanGeneralLedgerObjectSummaryTable(principalName);

    // force OJB to go to DB since it is populated using JDBC
    persistenceServiceOjb.clearCache();
  }
  @Override
  public boolean allForeignKeyValuesPopulatedForReference(Object bo, String referenceName) {
    if (!(bo instanceof PersistableBusinessObject)) {
      throw new UnsupportedOperationException(
          "getReferenceIfExists only supports PersistableBusinessObject in KNS");
    }

    return persistenceService.allForeignKeyValuesPopulatedForReference(
        (PersistableBusinessObject) bo, referenceName);
  }
  protected void buildSubTreeSql(
      String principalName, BudgetConstructionOrganizationReports bcOrgRpts, int curLevel) {

    curLevel++;
    budgetPullupDao.buildSubTree(
        principalName,
        bcOrgRpts.getChartOfAccountsCode(),
        bcOrgRpts.getOrganizationCode(),
        curLevel);
    //      budgetPullupDao.initPointOfView(principalName, bcOrgRpts.getChartOfAccountsCode(),
    // bcOrgRpts.getOrganizationCode(), curLevel);
    //      budgetPullupDao.insertChildOrgs(principalName, curLevel);

    // force OJB to go to DB since it is populated using JDBC
    persistenceServiceOjb.clearCache();
  }
 @Override
 public Object resolveProxy(Object o) {
   return persistenceService.resolveProxy(o);
 }
 @Override
 public boolean isProxied(Object object) {
   return persistenceService.isProxied(object);
 }
 @Override
 public void refreshAllNonUpdatingReferences(Object persistableObject) {
   persistenceService.refreshAllNonUpdatingReferences(
       (PersistableBusinessObject) persistableObject);
   synchronizeEclipseLinkWeavings(persistableObject);
 }
 @Override
 public void retrieveReferenceObject(Object persistableObject, String referenceObjectName) {
   persistenceService.retrieveReferenceObject(persistableObject, referenceObjectName);
   synchronizeEclipseLinkWeavings(persistableObject, referenceObjectName);
 }
 @Override
 public void retrieveNonKeyFields(Object persistableObject) {
   persistenceService.retrieveNonKeyFields(persistableObject);
   synchronizeEclipseLinkWeavings(persistableObject);
 }
 @Override
 public Map<String, ?> getPrimaryKeyFieldValues(Object dataObject) {
   return persistenceService.getPrimaryKeyFieldValues(dataObject);
 }