Examples of FetchConfiguration


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

    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

        assertNotNull(fp);
        assertNotNull(fp.getFetchGroups());
        assertEquals(1, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
       
        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
                .getBroker()
                .getFetchConfiguration();
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
       
        FGManager mgr = managerSet.iterator().next();
        assertNotNull(mgr);
       
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

        assertNotNull(fp.getFetchGroups());
        assertEquals(2, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
       
        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
                .getBroker()
                .getFetchConfiguration();
        assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
        FGManager mgr = managerSet.iterator().next();
        assertNotNull(mgr);
       
        FGManager findMgr = em.find(FGManager.class, mgr.getId());
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

        assertNotNull(fp.getFetchGroups());
        assertEquals(1, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertTrue(fp.getFields().contains(empDescriptionFieldStr));
       
        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
                .getBroker()
                .getFetchConfiguration();
        assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
        FGManager mgr = managerSet.iterator().next();
        assertNotNull(mgr);
       
        FGManager findMgr = em.find(FGManager.class, mgr.getId());
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

        assertNotNull(fp.getFetchGroups());
        assertEquals(2, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
       
        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
                .getBroker()
                .getFetchConfiguration();
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
        FGManager mgr = managerSet.iterator().next();
        assertNotNull(mgr);
       
        FGManager findMgr = em.find(FGManager.class, mgr.getId());
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

        assertNotNull(fp.getFetchGroups());
        assertEquals(2, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("Default")); // Not the same as "default"
        assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
       
        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
                .getBroker()
                .getFetchConfiguration();
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
        FGManager mgr = managerSet.iterator().next();
        assertNotNull(mgr);
       
        FGManager findMgr = em.find(FGManager.class, mgr.getId());
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

        assertNotNull(fp.getFetchGroups());
        assertEquals(2, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("Default")); // Not the same as "default"
        assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
       
        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
                .getBroker()
                .getFetchConfiguration();
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
        fp.clearFetchGroups(); // OPENJPA-2413: now places "default" in the list of active fetch groups.
        assertNotNull(fp.getFetchGroups());
        assertEquals(1, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
        FGManager mgr = managerSet.iterator().next();
        assertNotNull(mgr);
       
        FGManager findMgr = em.find(FGManager.class, mgr.getId());
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

        assertNotNull(fp.getFetchGroups());
        assertEquals(2, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("Default")); // Not the same as "default"
        assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
       
        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
                .getBroker()
                .getFetchConfiguration();
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
       
        // OPENJPA-2413: now places "default" in the list of active fetch groups.
        fp.clearFetchGroups();
        assertNotNull(fp.getFetchGroups());
        assertEquals(1, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
        // Reset to the PCtx default Fetch Plan
        fp.resetFetchGroups();
        assertNotNull(fp);
        assertNotNull(fp.getFetchGroups());
        assertEquals(2, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("Default")); // Not the same as "default"
        assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
        // Verify that the PCtx default fetch plan was properly restored.  "default" should not be enabled
        // since it was not listed by openjpa.FetchGroups.
        FGManager mgr = managerSet.iterator().next();
        assertNotNull(mgr);
View Full Code Here

Examples of org.apache.openjpa.kernel.FetchConfiguration

        assertNotNull(fp);
        assertNotNull(fp.getFetchGroups());
        assertEquals(1, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
       
        FetchConfiguration fetchCfg = ((org.apache.openjpa.persistence.EntityManagerImpl) em)
                .getBroker()
                .getFetchConfiguration();
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
       
        FGManager mgr = managerSet.iterator().next();
        assertNotNull(mgr);
       
        {
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.