/** * Initialize a newly-constructed state manager. */ protected StateManagerImpl initialize(StateManagerImpl sm, boolean load, FetchConfiguration fetch, Object edata) { if (!load) { sm.initialize(sm.getMetaData().getDescribedType(), PCState.HOLLOW); } else { PCState state = (useTransactionalState(fetch)) ? PCState.PCLEAN : PCState.PNONTRANS; sm.setLoading(true); try { if (!_store.initialize(sm, state, fetch, edata)) return null; } finally { sm.setLoading(false); } } return sm; }
/** * Initialize a newly-constructed state manager. */ protected StateManagerImpl initialize(StateManagerImpl sm, boolean load, FetchConfiguration fetch, Object edata) { if (!load) { sm.initialize(sm.getMetaData().getDescribedType(), PCState.HOLLOW); } else { PCState state = (useTransactionalState(fetch)) ? PCState.PCLEAN : PCState.PNONTRANS; sm.setLoading(true); try { if (!_store.initialize(sm, state, fetch, edata)) return null; } finally { sm.setLoading(false); } } return sm; }
/** * Initialize a newly-constructed state manager. */ protected StateManagerImpl initialize(StateManagerImpl sm, boolean load, FetchConfiguration fetch, Object edata) { if (!load) { sm.initialize(sm.getMetaData().getDescribedType(), PCState.HOLLOW); } else { PCState state = (useTransactionalState(fetch)) ? PCState.PCLEAN : PCState.PNONTRANS; sm.setLoading(true); try { if (!_store.initialize(sm, state, fetch, edata)) return null; } finally { sm.setLoading(false); } } return sm; }
/** * Initialize a newly-constructed state manager. */ protected StateManagerImpl initialize(StateManagerImpl sm, boolean load, FetchConfiguration fetch, Object edata) { if (!load) { sm.initialize(sm.getMetaData().getDescribedType(), PCState.HOLLOW); } else { PCState state = (useTransactionalState(fetch)) ? PCState.PCLEAN : PCState.PNONTRANS; sm.setLoading(true); try { if (!_store.initialize(sm, state, fetch, edata)) return null; } finally { sm.setLoading(false); } } return sm; }
/** * Initialize a newly-constructed state manager. */ protected StateManagerImpl initialize(StateManagerImpl sm, boolean load, FetchConfiguration fetch, Object edata) { if (!load) { sm.initialize(sm.getMetaData().getDescribedType(), PCState.HOLLOW); } else { PCState state = (useTransactionalState(fetch)) ? PCState.PCLEAN : PCState.PNONTRANS; sm.setLoading(true); try { if (!_store.initialize(sm, state, fetch, edata)) return null; } finally { sm.setLoading(false); } } return sm; }
StateManagerImpl sm = newStateManagerImpl(StateManagerId. newInstance(this), meta); sm.initialize(pc, PCState.TLOADED); try { switch (op) {
StateManagerImpl sm = newStateManagerImpl(StateManagerId. newInstance(this), meta); sm.initialize(pc, PCState.TLOADED); try { switch (op) {
StateManagerImpl sm = newStateManagerImpl(StateManagerId. newInstance(this), meta); sm.initialize(pc, PCState.TLOADED); try { switch (op) {
StateManagerImpl sm = newStateManagerImpl(StateManagerId. newInstance(this), meta); sm.initialize(pc, PCState.TLOADED); try { switch (op) {
StateManagerImpl sm = new StateManagerImpl(StateManagerId. newInstance(this), meta, this); sm.initialize(pc, PCState.TLOADED); try { switch (op) {
initialize(inst, state);
initialize(inst, state);
initialize(inst, state);
sm.initialize(sm.getMetaData().getDescribedType(), state);
sm.initialize(sm.getMetaData().getDescribedType(), state);
/** * If not already cached, create an empty copy of the given state * manager in the given state. */ OpenJPAStateManager copy(OpenJPAStateManager copy, PCState state) { beginOperation(true); try { assertOpen(); Object oid = copy.fetchObjectId(); Class type = copy.getManagedInstance().getClass(); if (oid == null) throw new InternalException(); // cached instance? StateManagerImpl sm = null; if (!copy.isEmbedded()) sm = getStateManagerImplById(oid, true); if (sm == null) { MetaDataRepository repos = _conf. getMetaDataRepositoryInstance(); ClassMetaData meta = repos.getMetaData(type, _loader, true); // construct a new state manager with all info known sm = new StateManagerImpl(oid, meta, this); sm.setObjectId(oid); sm.initialize(sm.getMetaData().getDescribedType(), state); } return sm; } finally { endOperation(); } }
sm.initialize(sm.getMetaData().getDescribedType(), state);
sm.initialize(sm.getMetaData().getDescribedType(), state);