private static boolean isManagedByAnotherPCtx(PersistenceCapable pc, BrokerImpl broker) { StateManager sm = pc.pcGetStateManager(); if (sm != null && sm instanceof StateManagerImpl) { StateManagerImpl smi = (StateManagerImpl) sm; Broker associatedBroker = smi.getBroker(); if (broker != associatedBroker) { return true; } } return false; } }
private static boolean isManagedByAnotherPCtx(PersistenceCapable pc, BrokerImpl broker) { StateManager sm = pc.pcGetStateManager(); if (sm != null && sm instanceof StateManagerImpl) { StateManagerImpl smi = (StateManagerImpl) sm; Broker associatedBroker = smi.getBroker(); if (broker != associatedBroker) { return true; } } return false; } }
private static boolean isManagedByAnotherPCtx(PersistenceCapable pc, BrokerImpl broker) { StateManager sm = pc.pcGetStateManager(); if (sm != null && sm instanceof StateManagerImpl) { StateManagerImpl smi = (StateManagerImpl) sm; Broker associatedBroker = smi.getBroker(); if (broker != associatedBroker) { return true; } } return false; } }
PCState delete(StateManagerImpl context) { context.preDelete(); if (!context.getBroker().isActive()) return PNONTRANSDELETED; return PDELETED; }
PCState beforeOptimisticWrite(StateManagerImpl context, int field, boolean mutate) { if (context.getBroker().getAutoClear() == AutoClear.CLEAR_ALL) return beforeWrite(context, field, mutate, true); return PDIRTY; }
PCState delete(StateManagerImpl context) { context.preDelete(); if (!context.getBroker().isActive()) return PNONTRANSDELETED; return PDELETED; }
PCState transactional(StateManagerImpl context) { // state is discarded when entering the transaction if (!context.getBroker().getOptimistic()) context.clearFields(); return ECLEAN; }
PCState delete(StateManagerImpl context) { context.preDelete(); if (!context.getBroker().isActive()) return PNONTRANSDELETED; return PDELETED; }
PCState beforeOptimisticWrite(StateManagerImpl context, int field, boolean mutate) { if (context.getBroker().getAutoClear() == AutoClear.CLEAR_ALL) return beforeWrite(context, field, mutate, true); return PDIRTY; }
PCState delete(StateManagerImpl context) { context.preDelete(); if (!context.getBroker().isActive()) return PNONTRANSDELETED; return PDELETED; }
PCState beforeOptimisticWrite(StateManagerImpl context, int field, boolean mutate) { if (context.getBroker().getAutoClear() == AutoClear.CLEAR_ALL) return beforeWrite(context, field, mutate, true); return PDIRTY; }
PCState transactional(StateManagerImpl context) { // state is discarded when entering the transaction if (!context.getBroker().getOptimistic()) context.clearFields(); return ECLEAN; }
@Override void initialize(StateManagerImpl context, PCState previous) { // mark r/w ok, remove from management context.unproxyFields(); context.getPersistenceCapable().pcReplaceStateManager(null); context.getBroker().setStateManager(context.getId(), context, BrokerImpl.STATUS_TRANSIENT); }
@Override void initialize(StateManagerImpl context, PCState previous) { // mark r/w ok, remove from management context.unproxyFields(); context.getPersistenceCapable().pcReplaceStateManager(null); context.getBroker().setStateManager(context.getId(), context, BrokerImpl.STATUS_TRANSIENT); }
@Override void initialize(StateManagerImpl context, PCState previous) { // mark r/w ok, remove from management context.unproxyFields(); context.getPersistenceCapable().pcReplaceStateManager(null); context.getBroker().setStateManager(context.getId(), context, BrokerImpl.STATUS_TRANSIENT); }
void initialize(StateManagerImpl context) { // mark r/w ok, remove from management context.unproxyFields(); context.getPersistenceCapable().pcReplaceStateManager(null); context.getBroker().setStateManager(context.getId(), context, BrokerImpl.STATUS_TRANSIENT); } }