/** * Method to transition to refresh state. * @param op ObjectProvider. * @return new LifeCycle state. **/ public LifeCycleState transitionRefresh(ObjectProvider op) { // Refresh the FetchPlan fields and unload all others op.refreshFieldsInFetchPlan(); op.unloadNonFetchPlanFields(); return this; }
/** * Method to transition to refresh state. * @param op ObjectProvider. * @return new LifeCycle state. */ public LifeCycleState transitionRefresh(ObjectProvider op) { op.clearSavedFields(); // Refresh the FetchPlan fields and unload all others op.refreshFieldsInFetchPlan(); op.unloadNonFetchPlanFields(); // We leave in the same state to be consistent with JDO section 5.9.1 return this; }
/** * Method to transition to refresh state. * @param op ObjectProvider. * @return new LifeCycle state. **/ public LifeCycleState transitionRefresh(ObjectProvider op) { op.clearSavedFields(); // Refresh the FetchPlan fields and unload all others op.refreshFieldsInFetchPlan(); op.unloadNonFetchPlanFields(); Transaction tx = op.getExecutionContext().getTransaction(); if (tx.isActive()) { return changeState(op,P_CLEAN); } return changeState(op,P_NONTRANS); }
/** * Method to transition to refresh state. * @param op ObjectProvider. * @return new LifeCycle state. **/ public LifeCycleState transitionRefresh(ObjectProvider op) { op.clearSavedFields(); // Refresh the FetchPlan fields and unload all others op.refreshFieldsInFetchPlan(); op.unloadNonFetchPlanFields(); Transaction tx = op.getExecutionContext().getTransaction(); if (tx.isActive() && !tx.getOptimistic()) { return changeState(op,P_CLEAN); } return changeState(op,P_NONTRANS); }