/** * Whether to use lite detachment when auto detaching. This setting only applies when * DetachState is set to loaded. */ public boolean getLiteAutoDetach() { return (getDetachState() & DETACH_LOADED) == 1 && _liteAutoDetach; }
private static boolean useDetachedStateManager(StateManagerImpl sm, DetachOptions opts) { ClassMetaData meta = sm.getMetaData(); return !Boolean.FALSE.equals(meta.usesDetachedState()) && ClassMetaData.SYNTHETIC.equals(meta.getDetachedState()) && opts.getDetachedStateManager(); }
/** * Whether the class being enhanced should externalize to a detached * instance rather than serialize. */ private boolean externalizeDetached() { return ClassMetaData.SYNTHETIC.equals(_meta.getDetachedState()) && Serializable.class.isAssignableFrom(_meta.getDescribedType()) && !_repos.getConfiguration().getDetachStateInstance(). isDetachedStateTransient(); }
if (!opts.getDetachedStateManager() || !useDetachedStateManager(sm, opts)) { out.writeObject(getDetachedState(sm, idxs)); sm, idxs, opts.getAccessUnloaded(), broker.getMultithreaded())); return true;
/** * For auto-configuration of the detached state field. Accepts values * "true", "false", or "transient". */ public void setDetachedStateField(String val) { if (val == null) return; if ("transient".equals(val)) { setDetachedStateField(true); _transient = true; } else if ("true".equals(val)) { setDetachedStateField(true); _transient = false; } else if ("false".equals(val)) { setDetachedStateField(false); _transient = false; } else throw new IllegalArgumentException("DetachedStateField=" + val); }
/** * Whether an instance of this type has detached state, assuming the given * detached state field. * * @return true if a detached instance must have detached state, false * if it does not, and null if it may use a * manually-constructed instance without detached state */ private Boolean usesDetachedState(String detachedField, boolean confDisallows) { if (!isDetachable()) return Boolean.FALSE; // if we declare a detached state field, have to use it if (detachedField == null) return Boolean.FALSE; if (!SYNTHETIC.equals(detachedField)) return Boolean.TRUE; // allow conf to disallow if (confDisallows && !_repos.getConfiguration(). getDetachStateInstance().getDetachedStateField()) return Boolean.FALSE; // have to use detached state to store datastore id if (getIdentityType() == ID_DATASTORE) return Boolean.TRUE; // allow detached state use, but don't require return null; }
public DetachManagerLite(OpenJPAConfiguration conf) { _detachProxies = conf.getDetachStateInstance().getDetachProxyFields(); _tsm = new TransferFieldManager(); }
private void detachAllInternal(OpCallbacks call) { if(_conf.getDetachStateInstance().getLiteAutoDetach() == true){ detachAllInternalLite(); return;
if (!opts.getDetachedStateManager() || !useDetachedStateManager(sm, opts)) { out.writeObject(getDetachedState(sm, idxs)); sm, idxs, opts.getAccessUnloaded(), broker.getMultithreaded())); return true;
/** * For auto-configuration of the detached state field. Accepts values * "true", "false", or "transient". */ public void setDetachedStateField(String val) { if (val == null) return; if ("transient".equals(val)) { setDetachedStateField(true); _transient = true; } else if ("true".equals(val)) { setDetachedStateField(true); _transient = false; } else if ("false".equals(val)) { setDetachedStateField(false); _transient = false; } else throw new IllegalArgumentException("DetachedStateField=" + val); }
/** * Whether an instance of this type has detached state, assuming the given * detached state field. * * @return true if a detached instance must have detached state, false * if it does not, and null if it may use a * manually-constructed instance without detached state */ private Boolean usesDetachedState(String detachedField, boolean confDisallows) { if (!isDetachable()) return Boolean.FALSE; // if we declare a detached state field, have to use it if (detachedField == null) return Boolean.FALSE; if (!SYNTHETIC.equals(detachedField)) return Boolean.TRUE; // allow conf to disallow if (confDisallows && !_repos.getConfiguration(). getDetachStateInstance().getDetachedStateField()) return Boolean.FALSE; // have to use detached state to store datastore id if (getIdentityType() == ID_DATASTORE) return Boolean.TRUE; // allow detached state use, but don't require return null; }
public DetachManagerLite(OpenJPAConfiguration conf) { _detachProxies = conf.getDetachStateInstance().getDetachProxyFields(); _tsm = new TransferFieldManager(); }
private void detachAllInternal(OpCallbacks call) { if(_conf.getDetachStateInstance().getLiteAutoDetach() == true){ detachAllInternalLite(); return;
if (!opts.getDetachedStateManager() || !useDetachedStateManager(sm, opts)) { out.writeObject(getDetachedState(sm, idxs)); sm, idxs, opts.getAccessUnloaded(), broker.getMultithreaded())); return true;
/** * Whether the class being enhanced should externalize to a detached * instance rather than serialize. */ private boolean externalizeDetached() { return ClassMetaData.SYNTHETIC.equals(_meta.getDetachedState()) && Serializable.class.isAssignableFrom(_meta.getDescribedType()) && !_repos.getConfiguration().getDetachStateInstance(). isDetachedStateTransient(); }
/** * Whether to use lite detachment when auto detaching. This setting only applies when * DetachState is set to loaded. */ public boolean getLiteAutoDetach() { return (getDetachState() & DETACH_LOADED) == 1 && _liteAutoDetach; }
private static boolean useDetachedStateManager(StateManagerImpl sm, DetachOptions opts) { ClassMetaData meta = sm.getMetaData(); return !Boolean.FALSE.equals(meta.usesDetachedState()) && ClassMetaData.SYNTHETIC.equals(meta.getDetachedState()) && opts.getDetachedStateManager(); }
/** * For auto-configuration of the detached state field. Accepts values * "true", "false", or "transient". */ public void setDetachedStateField(String val) { if (val == null) return; if ("transient".equals(val)) { setDetachedStateField(true); _transient = true; } else if ("true".equals(val)) { setDetachedStateField(true); _transient = false; } else if ("false".equals(val)) { setDetachedStateField(false); _transient = false; } else throw new IllegalArgumentException("DetachedStateField=" + val); }
/** * Whether an instance of this type has detached state, assuming the given * detached state field. * * @return true if a detached instance must have detached state, false * if it does not, and null if it may use a * manually-constructed instance without detached state */ private Boolean usesDetachedState(String detachedField, boolean confDisallows) { if (!isDetachable()) return Boolean.FALSE; // if we declare a detached state field, have to use it if (detachedField == null) return Boolean.FALSE; if (!SYNTHETIC.equals(detachedField)) return Boolean.TRUE; // allow conf to disallow if (confDisallows && !_repos.getConfiguration(). getDetachStateInstance().getDetachedStateField()) return Boolean.FALSE; // have to use detached state to store datastore id if (getIdentityType() == ID_DATASTORE) return Boolean.TRUE; // allow detached state use, but don't require return null; }
public DetachManagerLite(OpenJPAConfiguration conf) { _detachProxies = conf.getDetachStateInstance().getDetachProxyFields(); _tsm = new TransferFieldManager(); }