public void evictAll(Extent extent, OpCallbacks call) { try { _broker.evictAll(extent, call); } catch (RuntimeException re) { throw translate(re, extent.getElementType()); } }
protected void optimisticLockInternal(OpenJPAStateManager sm, int level, int timeout, Object sdata, boolean postLockVersionCheck) { // Set lock level first to prevent infinite recursion with // transactional(..) call setLockLevel(sm, level); if (level >= LockLevels.LOCK_WRITE && _versionUpdateOnWriteLock) getContext().transactional(sm.getManagedInstance(), true, null); else if (level >= LockLevels.LOCK_READ && _versionCheckOnReadLock) getContext().transactional(sm.getManagedInstance(), false, null); }
PCState beforeOptimisticWrite(StateManagerImpl context, int field, boolean mutate) { if (context.getBroker().getAutoClear() == AutoClear.CLEAR_ALL) return beforeWrite(context, field, mutate, true); return PDIRTY; }
/** * Delete a dereferenced dependent. */ private void deleteDeref(StateManagerImpl sm) { int action = processArgument(OpCallbacks.OP_DELETE, sm.getManagedInstance(), sm, null); if ((action & OpCallbacks.ACT_RUN) != 0) sm.delete(); if ((action & OpCallbacks.ACT_CASCADE) != 0) sm.cascadeDelete(_call); }
public Collection getTransactionalObjects() { beginOperation(false); try { return new ManagedObjectCollection(getTransactionalStates()); } finally { endOperation(); } }
public Collection getDirtyObjects() { beginOperation(false); try { return new ManagedObjectCollection(getDirtyStates()); } finally { endOperation(); } }
public boolean isStoreActive() { try { return _broker.isStoreActive(); } catch (RuntimeException re) { throw translate(re); } }
public ManagedRuntime getManagedRuntime() { try { return _broker.getManagedRuntime(); } catch (RuntimeException re) { throw translate(re); } }
public boolean getIgnoreChanges() { try { return _broker.getIgnoreChanges(); } catch (RuntimeException re) { throw translate(re); } }
public void setNontransactionalRead(boolean read) { try { _broker.setNontransactionalRead(read); } catch (RuntimeException re) { throw translate(re); } }
public void setRestoreState(int restore) { try { _broker.setRestoreState(restore); } catch (RuntimeException re) { throw translate(re); } }
public boolean getRetainState() { try { return _broker.getRetainState(); } catch (RuntimeException re) { throw translate(re); } }
public void setTransactionListenerCallbackMode(int mode) { try { _broker.setTransactionListenerCallbackMode(mode); } catch (RuntimeException re) { throw translate(re); } }
public void transactionalAll(Collection objs, boolean updateVersion, OpCallbacks call) { try { _broker.transactionalAll(objs, updateVersion, call); } catch (RuntimeException re) { throw translate(re, objs); } }