public void load(FetchConfiguration fetch) { load(fetch, LOAD_FGS, null, null, false); }
public void load(FetchConfiguration fetch) { load(fetch, LOAD_FGS, null, null, false); }
public void load(FetchConfiguration fetch) { load(fetch, LOAD_FGS, null, null, false); }
public void load(FetchConfiguration fetch) { load(fetch, LOAD_FGS, null, null, false); }
public void load(FetchConfiguration fetch) { load(fetch, LOAD_FGS, null, null, false); }
/** * Transition the given state managers to transactional. */ private void transactionalStatesAll(Collection sms, Collection failed, List exceps) { // make instances transactional and make sure they are loaded StateManagerImpl sm; for (Iterator itr = sms.iterator(); itr.hasNext();) { sm = (StateManagerImpl) itr.next(); if (failed != null && failed.contains(sm.getId())) continue; try { sm.transactional(); sm.load(_fc, StateManagerImpl.LOAD_FGS, null, null, false); } catch (OpenJPAException ke) { exceps = add(exceps, ke); } } throwNestedExceptions(exceps, false); }
/** * Transition the given state managers to transactional. */ private void transactionalStatesAll(Collection sms, Collection failed, List<Exception> exceps) { // make instances transactional and make sure they are loaded StateManagerImpl sm; for (Iterator<?> itr = sms.iterator(); itr.hasNext();) { sm = (StateManagerImpl) itr.next(); if (failed != null && failed.contains(sm.getId())) continue; try { sm.transactional(); sm.load(_fc, StateManagerImpl.LOAD_FGS, null, null, false); } catch (OpenJPAException ke) { exceps = add(exceps, ke); } } throwNestedExceptions(exceps, false); }
/** * Transition the given state managers to transactional. */ private void transactionalStatesAll(Collection sms, Collection failed, List<Exception> exceps) { // make instances transactional and make sure they are loaded StateManagerImpl sm; for (Iterator<?> itr = sms.iterator(); itr.hasNext();) { sm = (StateManagerImpl) itr.next(); if (failed != null && failed.contains(sm.getId())) continue; try { sm.transactional(); sm.load(_fc, StateManagerImpl.LOAD_FGS, null, null, false); } catch (OpenJPAException ke) { exceps = add(exceps, ke); } } throwNestedExceptions(exceps, false); }
/** * Transition the given state managers to transactional. */ private void transactionalStatesAll(Collection sms, Collection failed, List<Exception> exceps) { // make instances transactional and make sure they are loaded StateManagerImpl sm; for (Iterator<?> itr = sms.iterator(); itr.hasNext();) { sm = (StateManagerImpl) itr.next(); if (failed != null && failed.contains(sm.getId())) continue; try { sm.transactional(); sm.load(_fc, StateManagerImpl.LOAD_FGS, null, null, false); } catch (OpenJPAException ke) { exceps = add(exceps, ke); } } throwNestedExceptions(exceps, false); }
/** * Transition the given state managers to transactional. */ private void transactionalStatesAll(Collection sms, Collection failed, List<Exception> exceps) { // make instances transactional and make sure they are loaded StateManagerImpl sm; for (Iterator<?> itr = sms.iterator(); itr.hasNext();) { sm = (StateManagerImpl) itr.next(); if (failed != null && failed.contains(sm.getId())) continue; try { sm.transactional(); sm.load(_fc, StateManagerImpl.LOAD_FGS, null, null, false); } catch (OpenJPAException ke) { exceps = add(exceps, ke); } } throwNestedExceptions(exceps, false); }
/** * @return whether or not unloaded fields should be closed. */ public boolean serializing() { // if the broker is in the midst of a serialization, then no special // handling should be performed on the instance, and no subsequent // load should happen if (_broker.isSerializing()) return false; try { if (_meta.isDetachable()) return DetachManager.preSerialize(this); load(_broker.getFetchConfiguration(), LOAD_SERIALIZE, null, null, false); return false; } catch (RuntimeException re) { throw translate(re); } }
/** * @return whether or not unloaded fields should be closed. */ public boolean serializing() { // if the broker is in the midst of a serialization, then no special // handling should be performed on the instance, and no subsequent // load should happen if (_broker.isSerializing()) return false; try { if (_meta.isDetachable()) return DetachManager.preSerialize(this); load(_broker.getFetchConfiguration(), LOAD_SERIALIZE, null, null, false); return false; } catch (RuntimeException re) { throw translate(re); } }
/** * @return whether or not unloaded fields should be closed. */ public boolean serializing() { // if the broker is in the midst of a serialization, then no special // handling should be performed on the instance, and no subsequent // load should happen if (_broker.isSerializing()) return false; try { if (_meta.isDetachable()) return DetachManager.preSerialize(this); load(_broker.getFetchConfiguration(), LOAD_SERIALIZE, null, null, false); return false; } catch (RuntimeException re) { throw translate(re); } }
/** * @return whether or not unloaded fields should be closed. */ public boolean serializing() { // if the broker is in the midst of a serialization, then no special // handling should be performed on the instance, and no subsequent // load should happen if (_broker.isSerializing()) return false; try { if (_meta.isDetachable()) return DetachManager.preSerialize(this); load(_broker.getFetchConfiguration(), LOAD_SERIALIZE, null, null, false); return false; } catch (RuntimeException re) { throw translate(re); } }
/** * @return whether or not unloaded fields should be closed. */ public boolean serializing() { // if the broker is in the midst of a serialization, then no special // handling should be performed on the instance, and no subsequent // load should happen if (_broker.isSerializing()) return false; try { if (_meta.isDetachable()) return DetachManager.preSerialize(this); load(_broker.getFetchConfiguration(), LOAD_SERIALIZE, null, null, false); return false; } catch (RuntimeException re) { throw translate(re); } }
private PCState beforeWrite(StateManagerImpl context, int field, boolean mutate, boolean optimistic) { // if this is a direct mutation on an SCO field, we can't clear our // fields because that would also null the SCO; depending on whether // the user was directly manipulating the field or was using a method, // that will result in either an NPE or having the SCO be detached // from its owning object, making the user's change have no affect if (mutate && !optimistic) { Log log = context.getBroker().getConfiguration().getLog (OpenJPAConfiguration.LOG_RUNTIME); if (log.isWarnEnabled()) { log.warn(_loc.get("pessimistic-mutate", context.getMetaData().getField(field), context.getManagedInstance())); } } else if (!mutate) { // state is stored for rollback and fields are reloaded if (context.getDirty().length() > 0) context.saveFields(true); context.clearFields(); context.load(null, context.LOAD_FGS, null, null, true); } return PDIRTY; }
private PCState beforeWrite(StateManagerImpl context, int field, boolean mutate, boolean optimistic) { // if this is a direct mutation on an SCO field, we can't clear our // fields because that would also null the SCO; depending on whether // the user was directly manipulating the field or was using a method, // that will result in either an NPE or having the SCO be detached // from its owning object, making the user's change have no affect if (mutate && !optimistic) { Log log = context.getBroker().getConfiguration().getLog (OpenJPAConfiguration.LOG_RUNTIME); if (log.isWarnEnabled()) { log.warn(_loc.get("pessimistic-mutate", context.getMetaData().getField(field), context.getManagedInstance())); } } else if (!mutate) { // state is stored for rollback and fields are reloaded if (context.getDirty().length() > 0) context.saveFields(true); context.clearFields(); context.load(null, context.LOAD_FGS, null, null, true); } return PDIRTY; }
private PCState beforeWrite(StateManagerImpl context, int field, boolean mutate, boolean optimistic) { // if this is a direct mutation on an SCO field, we can't clear our // fields because that would also null the SCO; depending on whether // the user was directly manipulating the field or was using a method, // that will result in either an NPE or having the SCO be detached // from its owning object, making the user's change have no affect if (mutate && !optimistic) { Log log = context.getBroker().getConfiguration().getLog (OpenJPAConfiguration.LOG_RUNTIME); if (log.isWarnEnabled()) { log.warn(_loc.get("pessimistic-mutate", context.getMetaData().getField(field), context.getManagedInstance())); } } else if (!mutate) { // state is stored for rollback and fields are reloaded if (context.getDirty().length() > 0) context.saveFields(true); context.clearFields(); context.load(null, context.LOAD_FGS, null, null, true); } return PDIRTY; }
private PCState beforeWrite(StateManagerImpl context, int field, boolean mutate, boolean optimistic) { // if this is a direct mutation on an SCO field, we can't clear our // fields because that would also null the SCO; depending on whether // the user was directly manipulating the field or was using a method, // that will result in either an NPE or having the SCO be detached // from its owning object, making the user's change have no affect if (mutate && !optimistic) { Log log = context.getBroker().getConfiguration().getLog (OpenJPAConfiguration.LOG_RUNTIME); if (log.isWarnEnabled()) { log.warn(_loc.get("pessimistic-mutate", context.getMetaData().getField(field), context.getManagedInstance())); } } else if (!mutate) { // state is stored for rollback and fields are reloaded if (context.getDirty().length() > 0) context.saveFields(true); context.clearFields(); context.load(null, context.LOAD_FGS, null, null, true); } return PDIRTY; }
private PCState beforeWrite(StateManagerImpl context, int field, boolean mutate, boolean optimistic) { // if this is a direct mutation on an SCO field, we can't clear our // fields because that would also null the SCO; depending on whether // the user was directly manipulating the field or was using a method, // that will result in either an NPE or having the SCO be detached // from its owning object, making the user's change have no affect if (mutate && !optimistic) { Log log = context.getBroker().getConfiguration().getLog (OpenJPAConfiguration.LOG_RUNTIME); if (log.isWarnEnabled()) { log.warn(_loc.get("pessimistic-mutate", context.getMetaData().getField(field), context.getManagedInstance())); } } else if (!mutate) { // state is stored for rollback and fields are reloaded if (context.getDirty().length() > 0) context.saveFields(true); context.clearFields(); context.load(null, context.LOAD_FGS, null, null, true); } return PDIRTY; }