public boolean isDetached() { return _owner.isDetached(); }
public boolean isDetached() { return _owner.isDetached(); }
public boolean isDetached() { return _owner.isDetached(); }
public boolean isDetached() { return _owner.isDetached(); }
public boolean isDetached() { return _owner.isDetached(); }
/** * Used by proxy types to serialize non-proxy versions. */ public static Object writeReplace(Proxy proxy, boolean detachable) { if (detachable && (proxy == null || proxy.getOwner() == null || proxy.getOwner().isDetached())) return proxy; return proxy.copy(proxy); } }
/** * Throw IllegalArgumentExceptionif if entity is not a valid entity or * if it is detached. */ void assertValidAttchedEntity(String call, Object entity) { OpenJPAStateManager sm = _broker.getStateManager(entity); if (sm == null || !sm.isPersistent() || sm.isDetached() || (call.equals(REFRESH) && sm.isDeleted())) { throw new IllegalArgumentException(_loc.get("invalid_entity_argument", call, entity == null ? "null" : Exceptions.toString(entity)).getMessage()); } }
/** * Throw IllegalArgumentExceptionif if entity is not a valid entity or * if it is detached. */ void assertValidAttchedEntity(String call, Object entity) { OpenJPAStateManager sm = _broker.getStateManager(entity); if (sm == null || !sm.isPersistent() || sm.isDetached() || (call.equals(REFRESH) && sm.isDeleted())) { throw new IllegalArgumentException(_loc.get("invalid_entity_argument", call, entity == null ? "null" : Exceptions.toString(entity)).getMessage()); } }
/** * Throw IllegalArgumentExceptionif if entity is not a valid entity or * if it is detached. */ void assertValidAttchedEntity(String call, Object entity) { OpenJPAStateManager sm = _broker.getStateManager(entity); if (sm == null || !sm.isPersistent() || sm.isDetached() || (call.equals(REFRESH) && sm.isDeleted())) { throw new IllegalArgumentException(_loc.get("invalid_entity_argument", call, entity == null ? "null" : Exceptions.toString(entity)).getMessage()); } }
/** * Throw IllegalArgumentExceptionif if entity is not a valid entity or * if it is detached. */ void assertValidAttchedEntity(String call, Object entity) { OpenJPAStateManager sm = _broker.getStateManager(entity); if (sm == null || !sm.isPersistent() || sm.isDetached() || (call.equals(REFRESH) && sm.isDeleted())) { throw new IllegalArgumentException(_loc.get("invalid_entity_argument", call, entity == null ? "null" : Exceptions.toString(entity)).getMessage()); } }
if (sm != null && !sm.isDetached() && !sm.isPersistent()) return ACT_CASCADE; Exceptions.toString(obj))).setFailedObject(obj); if (sm != null && !sm.isDetached()) return ACT_CASCADE; break; break; case OP_DETACH: if (sm == null || !sm.isPersistent() || sm.isDetached()) return ACT_NONE; break;
if (sm != null && !sm.isDetached() && !sm.isPersistent()) return ACT_CASCADE; Exceptions.toString(obj))).setFailedObject(obj); if (sm != null && !sm.isDetached()) return ACT_CASCADE; break; break; case OP_DETACH: if (sm == null || !sm.isPersistent() || sm.isDetached()) return ACT_NONE; break;
if (sm != null && !sm.isDetached() && !sm.isPersistent()) return ACT_CASCADE; Exceptions.toString(obj))).setFailedObject(obj); if (sm != null && !sm.isDetached()) return ACT_CASCADE; break; break; case OP_DETACH: if (sm == null || !sm.isPersistent() || sm.isDetached()) return ACT_NONE; break;
if (sm != null && !sm.isDetached() && !sm.isPersistent()) return ACT_CASCADE; Exceptions.toString(obj))).setFailedObject(obj); if (sm != null && !sm.isDetached()) return ACT_CASCADE; break; break; case OP_DETACH: if (sm == null || !sm.isPersistent() || sm.isDetached()) return ACT_NONE; break;
public int processArgument(int op, Object obj, OpenJPAStateManager sm) { switch (op) { case OP_DELETE: // cascade through non-persistent non-detached instances if (sm == null && !_broker.isDetached(obj)) return ACT_CASCADE; if (sm != null && !sm.isDetached() && !sm.isPersistent()) return ACT_CASCADE; // ignore deleted instances if (sm != null && sm.isDeleted()) return ACT_NONE; break; case OP_ATTACH: // die on removed if (sm != null && sm.isDeleted()) throw new UserException(_loc.get("removed", Exceptions.toString(obj))).setFailedObject(obj); // cascade through managed instances if (sm != null && !sm.isDetached()) return ACT_CASCADE; break; case OP_REFRESH: // die on unmanaged instances if (sm == null) throw new UserException(_loc.get("not-managed", Exceptions.toString(obj))).setFailedObject(obj); break; } return ACT_RUN | ACT_CASCADE; }
if (proxy.getOwner().isDetached()) return proxy; else
} else if (sm.isDetached()) { obj = store.getContext().find(sm.getObjectId(), false, null); sm = store.getContext().getStateManager(obj);
if (sm == null) { ret = getValueFromUnmanagedInstance(obj, cols, true); } else if (sm.isDetached()) { obj = store.getContext().find(sm.getObjectId(), false, null); sm = store.getContext().getStateManager(obj);
if (sm == null) { ret = getValueFromUnmanagedInstance(obj, cols, true); } else if (sm.isDetached()) { obj = store.getContext().find(sm.getObjectId(), false, null); sm = store.getContext().getStateManager(obj);
} else if (sm.isDetached()) { obj = store.getContext().find(sm.getObjectId(), false, null); sm = store.getContext().getStateManager(obj);