Examples of FetchConfiguration


Examples of org.apache.openjpa.kernel.FetchConfiguration

     * a transaction.
     */
    private List checkCache(QueryKey qk) {
        if (qk == null)
            return null;
        FetchConfiguration fetch = getContext().getFetchConfiguration();
        if (!fetch.getQueryCacheEnabled())
            return null;
        if (fetch.getReadLockLevel() > LockLevels.LOCK_NONE)
            return null;

        // get the cached data
        QueryResult res = _cache.get(qk);
        if (res == null)
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

      }
      return result;
    }

    List<SliceStoreManager> findTargets() {
      FetchConfiguration fetch = owner.getContext()
          .getFetchConfiguration();
      return owner.getDistributedStore().getTargets(fetch);
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

    public FetchPlan getFetchPlan() {
        assertNotCloseInvoked();
        _broker.lock();
        try {
            FetchConfiguration fc = _broker.getFetchConfiguration();
            FetchPlan fp = _plans.get(fc);
            if (fp == null) {
                fp = _emf.toFetchPlan(_broker, fc);
                _plans.put(fc, fp);
            }
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

      }
      return result;
    }

    List<SliceStoreManager> findTargets() {
          FetchConfiguration fetch = owner.getContext().getFetchConfiguration();
      return owner.getDistributedStore().getTargets(fetch);
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

     * a transaction.
     */
    private List<Object> checkCache(QueryKey qk, FetchConfiguration loadFc) {
        if (qk == null)
            return null;
        FetchConfiguration fetch = getContext().getFetchConfiguration();
        if (!fetch.getQueryCacheEnabled())
            return null;
        if (fetch.getReadLockLevel() > LockLevels.LOCK_NONE)
            return null;

        // get the cached data
        QueryResult res = _cache.get(qk);      
        if (res == null) {
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

                QueryKey.newInstance(cq.getContext(), _ex.isPacking(q), params, _candidate, _subs, range.start,
                    range.end, parsed);

            // Create a new FetchConfiguration that will be used to ensure that any JOIN FETCHed fields are loaded
            StoreContext store = q.getContext().getStoreContext();
            FetchConfiguration cacheFc = store.pushFetchConfiguration();
            for (QueryExpressions qe : _ex.getQueryExpressions()) {
                for (String fetchFields : qe.fetchPaths) {
                    cacheFc.addField(fetchFields);
                }
                for (String fetchFields : qe.fetchInnerPaths) {
                    cacheFc.addField(fetchFields);
                }
            }
            try {
                List<Object> cached = cq.checkCache(key, cacheFc);
                if (cached != null) {
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

        return super.isCached(oids, edata);
    }

    public boolean syncVersion(OpenJPAStateManager sm, Object edata) {
        DataCache cache = _mgr.selectCache(sm);
        FetchConfiguration fc = sm.getContext().getFetchConfiguration();
        CacheStatistics stats = (cache == null) ? null : cache.getStatistics();
        if (cache == null || sm.isEmbedded() || fc.getCacheRetrieveMode() == DataCacheRetrieveMode.BYPASS) {
            if (stats != null && stats.isEnabled()) {
                ((CacheStatisticsSPI) stats).newGet(sm.getMetaData().getDescribedType(), false);
            }
            return super.syncVersion(sm, edata);
        }
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

    private boolean preExecute(Map params) {
        PreparedQueryCache cache = _em.getPreparedQueryCache();
        if (cache == null) {
            return false;
        }
        FetchConfiguration fetch = _query.getFetchConfiguration();
        if (fetch.getReadLockLevel() != 0) {
            if (cache.get(_id) != null) {
                ignorePreparedQuery();
            }
            return false;
        }
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

    public FetchPlan getFetchPlan() {
        assertNotCloseInvoked();
        _broker.lock();
        try {
            FetchConfiguration fc = _broker.getFetchConfiguration();
            FetchPlan fp = _plans.get(fc);
            if (fp == null) {
                fp = _emf.toFetchPlan(_broker, fc);
                _plans.put(fc, fp);
            }
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

     * a transaction.
     */
    private List<Object> checkCache(QueryKey qk) {
        if (qk == null)
            return null;
        FetchConfiguration fetch = getContext().getFetchConfiguration();
        if (!fetch.getQueryCacheEnabled())
            return null;
        if (fetch.getReadLockLevel() > LockLevels.LOCK_NONE)
            return null;

        // get the cached data
        QueryResult res = _cache.get(qk);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.