public static boolean isDelayed(ProxyCollection proxy) { if (proxy instanceof DelayedProxy) { DelayedProxy dProxy = (DelayedProxy)proxy; OpenJPAStateManager sm = dProxy.getDelayedOwner(); return (sm != null && sm.isDelayed(dProxy.getDelayedField())); } return false; }
private static boolean isDirectAccess(ProxyCollection coll) { if (coll instanceof DelayedProxy) { DelayedProxy dpxy = (DelayedProxy)coll; return dpxy.isDirectAccess(); } return false; }
private static void setDirectAccess(ProxyCollection coll, boolean direct) { if (coll instanceof DelayedProxy) { DelayedProxy dpxy = (DelayedProxy)coll; dpxy.setDirectAccess(direct); } }
if (dProxy.isDirectAccess()) { return; dProxy.setDirectAccess(true); state = checkState(proxy); boolean tracking = false; proxy.clear(); dProxy.getDelayedOwner().loadDelayedField(dProxy.getDelayedField()); if (!detaching && tracking && !ct.isTracking()) { ct.startTracking(); dProxy.setDirectAccess(false); proxy.addAll(added); added.clear(); dProxy.setDirectAccess(false); proxy.removeAll(removed); removed.clear(); dProxy.setDirectAccess(false); if (state[0]) { dProxy.closeBroker();
private static boolean[] checkState(ProxyCollection proxy) { boolean[] state = new boolean[2]; DelayedProxy dProxy = (DelayedProxy)proxy; OpenJPAStateManager sm = dProxy.getDelayedOwner(); if (sm != null) { // If the broker assigned to this proxy is null, closed or no longer // manages the pc, produce a new one Broker broker = sm.getContext().getBroker(); if (dProxy.isDetached() || broker == null || broker.isClosed() || (!broker.isClosed() && !broker.isPersistent(sm.getPersistenceCapable()))) { state[0] = true; broker = dProxy.getBroker(); ((StateManagerImpl)sm).setBroker((BrokerImpl)broker); } if (dProxy.isDetached() || sm.getPersistenceCapable().pcGetStateManager() == null) { state[1] = true; if (dProxy.getOwnerStateManager() != null) { sm.getPersistenceCapable().pcReplaceStateManager(dProxy.getOwnerStateManager()); ((StateManagerImpl)dProxy.getOwnerStateManager()).setBroker((BrokerImpl)broker); } else { sm.getPersistenceCapable().pcReplaceStateManager( new DetachedValueStateManager(sm.getPersistenceCapable(), sm.getContext())); } } } return state; }
if (dProxy.isDirectAccess()) { return; dProxy.setDirectAccess(true); state = checkState(proxy); boolean tracking = false; proxy.clear(); dProxy.getDelayedOwner().loadDelayedField(dProxy.getDelayedField()); if (!detaching && tracking && !ct.isTracking()) { ct.startTracking(); dProxy.setDirectAccess(false); proxy.addAll(added); added.clear(); dProxy.setDirectAccess(false); proxy.removeAll(removed); removed.clear(); dProxy.setDirectAccess(false); if (state[0]) { dProxy.closeBroker();
private static boolean[] checkState(ProxyCollection proxy) { boolean[] state = new boolean[2]; DelayedProxy dProxy = (DelayedProxy)proxy; OpenJPAStateManager sm = dProxy.getDelayedOwner(); if (sm != null) { // If the broker assigned to this proxy is null, closed or no longer // manages the pc, produce a new one Broker broker = sm.getContext().getBroker(); if (dProxy.isDetached() || broker == null || broker.isClosed() || (!broker.isClosed() && !broker.isPersistent(sm.getPersistenceCapable()))) { state[0] = true; broker = dProxy.getBroker(); ((StateManagerImpl)sm).setBroker((BrokerImpl)broker); } if (dProxy.isDetached() || sm.getPersistenceCapable().pcGetStateManager() == null) { state[1] = true; if (dProxy.getOwnerStateManager() != null) { sm.getPersistenceCapable().pcReplaceStateManager(dProxy.getOwnerStateManager()); ((StateManagerImpl)dProxy.getOwnerStateManager()).setBroker((BrokerImpl)broker); } else { sm.getPersistenceCapable().pcReplaceStateManager( new DetachedValueStateManager(sm.getPersistenceCapable(), sm.getContext())); } } } return state; }
if (dProxy.isDirectAccess()) { return; dProxy.setDirectAccess(true); state = checkState(proxy); boolean tracking = false; proxy.clear(); dProxy.getDelayedOwner().loadDelayedField(dProxy.getDelayedField()); if (!detaching && tracking && !ct.isTracking()) { ct.startTracking(); dProxy.setDirectAccess(false); proxy.addAll(added); added.clear(); dProxy.setDirectAccess(false); proxy.removeAll(removed); removed.clear(); dProxy.setDirectAccess(false); if (state[0]) { dProxy.closeBroker();
private static boolean[] checkState(ProxyCollection proxy) { boolean[] state = new boolean[2]; DelayedProxy dProxy = (DelayedProxy)proxy; OpenJPAStateManager sm = dProxy.getDelayedOwner(); if (sm != null) { // If the broker assigned to this proxy is null, closed or no longer // manages the pc, produce a new one Broker broker = sm.getContext().getBroker(); if (dProxy.isDetached() || broker == null || broker.isClosed() || (!broker.isClosed() && !broker.isPersistent(sm.getPersistenceCapable()))) { state[0] = true; broker = dProxy.getBroker(); ((StateManagerImpl)sm).setBroker((BrokerImpl)broker); } if (dProxy.isDetached() || sm.getPersistenceCapable().pcGetStateManager() == null) { state[1] = true; if (dProxy.getOwnerStateManager() != null) { sm.getPersistenceCapable().pcReplaceStateManager(dProxy.getOwnerStateManager()); ((StateManagerImpl)dProxy.getOwnerStateManager()).setBroker((BrokerImpl)broker); } else { sm.getPersistenceCapable().pcReplaceStateManager( new DetachedValueStateManager(sm.getPersistenceCapable(), sm.getContext())); } } } return state; }
public static boolean isDelayed(ProxyCollection proxy) { if (proxy instanceof DelayedProxy) { DelayedProxy dProxy = (DelayedProxy)proxy; OpenJPAStateManager sm = dProxy.getDelayedOwner(); return (sm != null && sm.isDelayed(dProxy.getDelayedField())); } return false; }
private static void setDirectAccess(ProxyCollection coll, boolean direct) { if (coll instanceof DelayedProxy) { DelayedProxy dpxy = (DelayedProxy)coll; dpxy.setDirectAccess(direct); } }
private static boolean isDirectAccess(ProxyCollection coll) { if (coll instanceof DelayedProxy) { DelayedProxy dpxy = (DelayedProxy)coll; return dpxy.isDirectAccess(); } return false; }
if (dProxy.isDirectAccess()) { return; dProxy.setDirectAccess(true); state = checkState(proxy); boolean tracking = false; proxy.clear(); dProxy.getDelayedOwner().loadDelayedField(dProxy.getDelayedField()); if (!detaching && tracking && !ct.isTracking()) { ct.startTracking(); dProxy.setDirectAccess(false); proxy.addAll(added); added.clear(); dProxy.setDirectAccess(false); proxy.removeAll(removed); removed.clear(); dProxy.setDirectAccess(false); if (state[0]) { dProxy.closeBroker();
private static boolean[] checkState(ProxyCollection proxy) { boolean[] state = new boolean[2]; DelayedProxy dProxy = (DelayedProxy)proxy; OpenJPAStateManager sm = dProxy.getDelayedOwner(); if (sm != null) { // If the broker assigned to this proxy is null, closed or no longer // manages the pc, produce a new one Broker broker = sm.getContext().getBroker(); if (dProxy.isDetached() || broker == null || broker.isClosed() || (!broker.isClosed() && !broker.isPersistent(sm.getPersistenceCapable()))) { state[0] = true; broker = dProxy.getBroker(); ((StateManagerImpl)sm).setBroker((BrokerImpl)broker); } if (dProxy.isDetached() || sm.getPersistenceCapable().pcGetStateManager() == null) { state[1] = true; if (dProxy.getOwnerStateManager() != null) { sm.getPersistenceCapable().pcReplaceStateManager(dProxy.getOwnerStateManager()); ((StateManagerImpl)dProxy.getOwnerStateManager()).setBroker((BrokerImpl)broker); } else { sm.getPersistenceCapable().pcReplaceStateManager( new DetachedValueStateManager(sm.getPersistenceCapable(), sm.getContext())); } } } return state; }
public static boolean isDelayed(ProxyCollection proxy) { if (proxy instanceof DelayedProxy) { DelayedProxy dProxy = (DelayedProxy)proxy; OpenJPAStateManager sm = dProxy.getDelayedOwner(); return (sm != null && sm.isDelayed(dProxy.getDelayedField())); } return false; }
private static void setDirectAccess(ProxyCollection coll, boolean direct) { if (coll instanceof DelayedProxy) { DelayedProxy dpxy = (DelayedProxy)coll; dpxy.setDirectAccess(direct); } }
private static boolean isDirectAccess(ProxyCollection coll) { if (coll instanceof DelayedProxy) { DelayedProxy dpxy = (DelayedProxy)coll; return dpxy.isDirectAccess(); } return false; }
public static boolean isDelayed(ProxyCollection proxy) { if (proxy instanceof DelayedProxy) { DelayedProxy dProxy = (DelayedProxy)proxy; OpenJPAStateManager sm = dProxy.getDelayedOwner(); return (sm != null && sm.isDelayed(dProxy.getDelayedField())); } return false; }
private static void setDirectAccess(ProxyCollection coll, boolean direct) { if (coll instanceof DelayedProxy) { DelayedProxy dpxy = (DelayedProxy)coll; dpxy.setDirectAccess(direct); } }
private static boolean isDirectAccess(ProxyCollection coll) { if (coll instanceof DelayedProxy) { DelayedProxy dpxy = (DelayedProxy)coll; return dpxy.isDirectAccess(); } return false; }