/** * Return whether the given field is loaded for the given instance. */ private boolean isLoaded(OpenJPAStateManager sm, int field) { if (sm.getLoaded().get(field)) return true; // if the field isn't loaded in the state manager, it still might be // loaded in the data cache, in which case we still have to correct // it to keep the cache in sync DataCache cache = _mgr.selectCache(sm); if (cache == null) return false; // can't retrieve an embedded object directly, so always assume the // field is loaded and needs to be corrected if (sm.isEmbedded()) return true; PCData pc = cache.get(sm.getObjectId()); if (pc == null) return false; return pc.isLoaded(field); }
/** * Return whether the given field is loaded for the given instance. */ private boolean isLoaded(OpenJPAStateManager sm, int field) { if (sm.getLoaded().get(field)) return true; // if the field isn't loaded in the state manager, it still might be // loaded in the data cache, in which case we still have to correct // it to keep the cache in sync DataCache cache = _mgr.selectCache(sm); if (cache == null) return false; // can't retrieve an embedded object directly, so always assume the // field is loaded and needs to be corrected if (sm.isEmbedded()) return true; PCData pc = cache.get(sm.getObjectId()); if (pc == null) return false; return pc.isLoaded(field); }
/** * Return whether the given field is loaded for the given instance. */ private boolean isLoaded(OpenJPAStateManager sm, int field) { if (sm.getLoaded().get(field)) return true; // if the field isn't loaded in the state manager, it still might be // loaded in the data cache, in which case we still have to correct // it to keep the cache in sync DataCache cache = _mgr.selectCache(sm); if (cache == null) return false; // can't retrieve an embedded object directly, so always assume the // field is loaded and needs to be corrected if (sm.isEmbedded()) return true; PCData pc = cache.get(sm.getObjectId()); if (pc == null) return false; return pc.isLoaded(field); }
/** * Return whether the given field is loaded for the given instance. */ private boolean isLoaded(OpenJPAStateManager sm, int field) { if (sm.getLoaded().get(field)) return true; // if the field isn't loaded in the state manager, it still might be // loaded in the data cache, in which case we still have to correct // it to keep the cache in sync DataCache cache = _mgr.selectCache(sm); if (cache == null) return false; // can't retrieve an embedded object directly, so always assume the // field is loaded and needs to be corrected if (sm.isEmbedded()) return true; PCData pc = cache.get(sm.getObjectId()); if (pc == null) return false; return pc.isLoaded(field); }
public boolean load(OpenJPAStateManager sm, BitSet fields, FetchConfiguration fetch, int lockLevel, Object edata) { DataCache cache = _mgr.selectCache(sm);
public boolean load(OpenJPAStateManager sm, BitSet fields, FetchConfiguration fetch, int lockLevel, Object edata) { DataCache cache = _mgr.selectCache(sm);
public boolean load(OpenJPAStateManager sm, BitSet fields, FetchConfiguration fetch, int lockLevel, Object edata) { DataCache cache = _mgr.selectCache(sm);
public void evict(Object obj, OpCallbacks call) { if (obj == null) return; beginOperation(false); try { StateManagerImpl sm = getStateManagerImpl(obj, true); if ((processArgument(OpCallbacks.OP_EVICT, obj, sm, call) & OpCallbacks.ACT_RUN) == 0) return; if (sm == null) return; sm.evict(); if (_evictDataCache && sm.getObjectId() != null) { DataCache cache = _conf.getDataCacheManagerInstance().selectCache(sm); if (cache != null) cache.remove(sm.getObjectId()); } } catch (OpenJPAException ke) { throw ke; } catch (RuntimeException re) { throw new GeneralException(re); } finally { endOperation(); } }
public void evict(Object obj, OpCallbacks call) { if (obj == null) return; beginOperation(false); try { StateManagerImpl sm = getStateManagerImpl(obj, true); if ((processArgument(OpCallbacks.OP_EVICT, obj, sm, call) & OpCallbacks.ACT_RUN) == 0) return; if (sm == null) return; sm.evict(); if (_evictDataCache && sm.getObjectId() != null) { DataCache cache = _conf.getDataCacheManagerInstance().selectCache(sm); if (cache != null) cache.remove(sm.getObjectId()); } } catch (OpenJPAException ke) { throw ke; } catch (RuntimeException re) { throw new GeneralException(re); } finally { endOperation(); } }
public void evict(Object obj, OpCallbacks call) { if (obj == null) return; beginOperation(false); try { StateManagerImpl sm = getStateManagerImpl(obj, true); if ((processArgument(OpCallbacks.OP_EVICT, obj, sm, call) & OpCallbacks.ACT_RUN) == 0) return; if (sm == null) return; sm.evict(); if (_evictDataCache && sm.getObjectId() != null) { DataCache cache = _conf.getDataCacheManagerInstance().selectCache(sm); if (cache != null) cache.remove(sm.getObjectId()); } } catch (OpenJPAException ke) { throw ke; } catch (RuntimeException re) { throw new GeneralException(re); } finally { endOperation(); } }
public void evict(Object obj, OpCallbacks call) { if (obj == null) return; beginOperation(false); try { StateManagerImpl sm = getStateManagerImpl(obj, true); if ((processArgument(OpCallbacks.OP_EVICT, obj, sm, call) & OpCallbacks.ACT_RUN) == 0) return; if (sm == null) return; sm.evict(); if (_evictDataCache && sm.getObjectId() != null) { DataCache cache = _conf.getDataCacheManagerInstance().selectCache(sm); if (cache != null) cache.remove(sm.getObjectId()); } } catch (OpenJPAException ke) { throw ke; } catch (RuntimeException re) { throw new GeneralException(re); } finally { endOperation(); } }
public boolean exists(OpenJPAStateManager sm, Object edata) { DataCache cache = _mgr.selectCache(sm); CacheStatistics stats = (cache == null) ? null : cache.getStatistics(); if (cache != null && !isLocking(null) && cache.contains(sm.getObjectId())){ if (stats != null && stats.isEnabled()) { // delay this call ONLY if stats collection is enabled Class<?> cls = sm.getMetaData().getDescribedType(); ((CacheStatisticsSPI)stats).newGet(cls, false); } return true; } // If isLocking(null)==true && cache.contains(..) == true... probably shouldn't count? if (stats != null && stats.isEnabled()) { // delay this call ONLY if stats collection is enabled Class<?> cls = sm.getMetaData().getDescribedType(); ((CacheStatisticsSPI)stats).newGet(cls, false); } return super.exists(sm, edata); }
public boolean exists(OpenJPAStateManager sm, Object edata) { DataCache cache = _mgr.selectCache(sm); CacheStatistics stats = (cache == null) ? null : cache.getStatistics(); if (cache != null && !isLocking(null) && cache.contains(sm.getObjectId())){ if (stats != null && stats.isEnabled()) { // delay this call ONLY if stats collection is enabled Class<?> cls = sm.getMetaData().getDescribedType(); ((CacheStatisticsSPI)stats).newGet(cls, false); } return true; } // If isLocking(null)==true && cache.contains(..) == true... probably shouldn't count? if (stats != null && stats.isEnabled()) { // delay this call ONLY if stats collection is enabled Class<?> cls = sm.getMetaData().getDescribedType(); ((CacheStatisticsSPI)stats).newGet(cls, false); } return super.exists(sm, edata); }
public boolean exists(OpenJPAStateManager sm, Object edata) { DataCache cache = _mgr.selectCache(sm); CacheStatistics stats = (cache == null) ? null : cache.getStatistics(); if (cache != null && !isLocking(null) && cache.contains(sm.getObjectId())){ if (stats != null && stats.isEnabled()) { // delay this call ONLY if stats collection is enabled Class<?> cls = sm.getMetaData().getDescribedType(); ((CacheStatisticsSPI)stats).newGet(cls, false); } return true; } // If isLocking(null)==true && cache.contains(..) == true... probably shouldn't count? if (stats != null && stats.isEnabled()) { // delay this call ONLY if stats collection is enabled Class<?> cls = sm.getMetaData().getDescribedType(); ((CacheStatisticsSPI)stats).newGet(cls, false); } return super.exists(sm, edata); }
public boolean exists(OpenJPAStateManager sm, Object edata) { DataCache cache = _mgr.selectCache(sm); CacheStatistics stats = (cache == null) ? null : cache.getStatistics(); if (cache != null && !isLocking(null) && cache.contains(sm.getObjectId())){ if (stats != null && stats.isEnabled()) { // delay this call ONLY if stats collection is enabled Class<?> cls = sm.getMetaData().getDescribedType(); ((CacheStatisticsSPI)stats).newGet(cls, false); } return true; } // If isLocking(null)==true && cache.contains(..) == true... probably shouldn't count? if (stats != null && stats.isEnabled()) { // delay this call ONLY if stats collection is enabled Class<?> cls = sm.getMetaData().getDescribedType(); ((CacheStatisticsSPI)stats).newGet(cls, false); } return super.exists(sm, edata); }
public boolean initialize(OpenJPAStateManager sm, PCState state, FetchConfiguration fetch, Object edata) { DataCache cache = _mgr.selectCache(sm); if (cache == null) { return super.initialize(sm, state, fetch, edata); cache = _mgr.selectCache(sm); if (cache != null) { cacheStateManager(cache, sm, data);
DataCache cache = _mgr.selectCache(sm); if (cache == null) { return;
DataCache cache = _mgr.selectCache(sm); if (cache == null) { return;
public boolean syncVersion(OpenJPAStateManager sm, Object edata) { DataCache cache = _mgr.selectCache(sm); FetchConfiguration fc = sm.getContext().getFetchConfiguration(); CacheStatistics stats = (cache == null) ? null : cache.getStatistics();
public boolean syncVersion(OpenJPAStateManager sm, Object edata) { DataCache cache = _mgr.selectCache(sm); FetchConfiguration fc = sm.getContext().getFetchConfiguration(); CacheStatistics stats = (cache == null) ? null : cache.getStatistics();