/** * Ask store manager to assign our oid, optionally flushing and * optionally recaching on the new oid. */ private boolean assignObjectId(boolean flush, boolean preFlushing) { if (_oid != null || isEmbedded() || !isPersistent()) return true; if (_broker.getStoreManager().assignObjectId(this, preFlushing)) { if (!preFlushing) assertObjectIdAssigned(true); } else if (flush) _broker.flush(); else return false; return true; }
/** * Ask store manager to assign our oid, optionally flushing and * optionally recaching on the new oid. */ boolean assignObjectId(boolean flush, boolean preFlushing) { if (_oid != null || isEmbedded() || !isPersistent()) return true; if (_broker.getStoreManager().assignObjectId(this, preFlushing)) { if (!preFlushing) assertObjectIdAssigned(true); } else if (flush) _broker.flush(); else return false; return true; }
/** * Ask store manager to assign our oid, optionally flushing and * optionally recaching on the new oid. */ boolean assignObjectId(boolean flush, boolean preFlushing) { if (_oid != null || isEmbedded() || !isPersistent()) return true; if (_broker.getStoreManager().assignObjectId(this, preFlushing)) { if (!preFlushing) assertObjectIdAssigned(true); } else if (flush) _broker.flush(); else return false; return true; }
/** * Ask store manager to assign our oid, optionally flushing and * optionally recaching on the new oid. */ boolean assignObjectId(boolean flush, boolean preFlushing) { if (_oid != null || isEmbedded() || !isPersistent()) return true; if (_broker.getStoreManager().assignObjectId(this, preFlushing)) { if (!preFlushing) assertObjectIdAssigned(true); } else if (flush) _broker.flush(); else return false; return true; }
/** * Ask store manager to assign our oid, optionally flushing and * optionally recaching on the new oid. */ boolean assignObjectId(boolean flush, boolean preFlushing) { if (_oid != null || isEmbedded() || !isPersistent()) return true; if (_broker.getStoreManager().assignObjectId(this, preFlushing)) { if (!preFlushing) assertObjectIdAssigned(true); } else if (flush) _broker.flush(); else return false; return true; }
/** * Delegates to the current state after checking the value * of the RetainState flag. * * @see PCState#commit * @see PCState#commitRetain */ void commit() { // release locks before oid updated releaseLocks(); // update version and oid information setVersion(_version); _flags &= ~FLAG_FLUSHED; _flags &= ~FLAG_FLUSHED_DIRTY; Object orig = _id; assertObjectIdAssigned(false); boolean wasNew = isNew() && !isDeleted() && !isProvisional(); if (_broker.getRetainState()) setPCState(_state.commitRetain(this)); else setPCState(_state.commit(this)); // ask the broker to re-cache us if we were new previously if (wasNew) _broker.setStateManager(orig, this, BrokerImpl.STATUS_COMMIT_NEW); }
/** * Delegates to the current state after checking the value * of the RetainState flag. * * @see PCState#commit * @see PCState#commitRetain */ void commit() { // release locks before oid updated releaseLocks(); // update version and oid information setVersion(_version); _flags &= ~FLAG_FLUSHED; _flags &= ~FLAG_FLUSHED_DIRTY; Object orig = _id; assertObjectIdAssigned(false); boolean wasNew = isNew() && !isDeleted() && !isProvisional(); if (_broker.getRetainState()) setPCState(_state.commitRetain(this)); else setPCState(_state.commit(this)); // ask the broker to re-cache us if we were new previously if (wasNew) _broker.setStateManager(orig, this, BrokerImpl.STATUS_COMMIT_NEW); }
/** * Delegates to the current state after checking the value * of the RetainState flag. * * @see PCState#commit * @see PCState#commitRetain */ void commit() { // release locks before oid updated releaseLocks(); // update version and oid information setVersion(_version); _flags &= ~FLAG_FLUSHED; _flags &= ~FLAG_FLUSHED_DIRTY; Object orig = _id; assertObjectIdAssigned(false); boolean wasNew = isNew() && !isDeleted() && !isProvisional(); if (_broker.getRetainState()) setPCState(_state.commitRetain(this)); else setPCState(_state.commit(this)); // ask the broker to re-cache us if we were new previously if (wasNew) _broker.setStateManager(orig, this, BrokerImpl.STATUS_COMMIT_NEW); }
/** * Delegates to the current state after checking the value * of the RetainState flag. * * @see PCState#commit * @see PCState#commitRetain */ void commit() { // release locks before oid updated releaseLocks(); // update version and oid information setVersion(_version); _flags &= ~FLAG_FLUSHED; _flags &= ~FLAG_FLUSHED_DIRTY; Object orig = _id; assertObjectIdAssigned(false); boolean wasNew = isNew() && !isDeleted() && !isProvisional(); if (_broker.getRetainState()) setPCState(_state.commitRetain(this)); else setPCState(_state.commit(this)); // ask the broker to re-cache us if we were new previously if (wasNew) _broker.setStateManager(orig, this, BrokerImpl.STATUS_COMMIT_NEW); }
/** * Delegates to the current state after checking the value * of the RetainState flag. * * @see PCState#commit * @see PCState#commitRetain */ void commit() { // release locks before oid updated releaseLocks(); // update version and oid information setVersion(_version); _flags &= ~FLAG_FLUSHED; _flags &= ~FLAG_FLUSHED_DIRTY; Object orig = _id; assertObjectIdAssigned(false); boolean wasNew = isNew() && !isDeleted() && !isProvisional(); if (_broker.getRetainState()) setPCState(_state.commitRetain(this)); else setPCState(_state.commit(this)); // ask the broker to re-cache us if we were new previously if (wasNew) _broker.setStateManager(orig, this, BrokerImpl.STATUS_COMMIT_NEW); }