Package org.apache.openjpa.persistence

Examples of org.apache.openjpa.persistence.StoreCacheImpl


        em.close();
    }

    public void testDataCacheOverFlow() {
        OpenJPAEntityManagerSPI em = emf.createEntityManager();
        StoreCacheImpl storeCache = (StoreCacheImpl) emf.getCache();
        DataCache cache = (DataCache) storeCache.getDelegate();
        LinkedList<CachedPerson> people = new LinkedList<CachedPerson>();

        // Persist cacheSize + 1 Entites.
        for (int i = 0; i < cacheSize + 1; i++) {
            em.getTransaction().begin();
View Full Code Here


        em.close();
    }

    public void testArrayOfStrings() {
        // check that the data cache contains an efficient representation
        StoreCacheImpl storeCache = (StoreCacheImpl)
            OpenJPAPersistence.cast(emf).getStoreCache();
        DataCache cache = storeCache.getDelegate();
        PCData data = cache.get(internalOid);
        ClassMetaData meta = JPAFacadeHelper.getMetaData(emf,
            AllFieldTypes.class);
        Object cachedFieldData =
            data.getData(meta.getField("arrayOfStrings").getIndex());
View Full Code Here

        em.close();
    }

    public void testArrayOfInts() {
        // check that the data cache contains an efficient representation
        StoreCacheImpl storeCache = (StoreCacheImpl)
            OpenJPAPersistence.cast(emf).getStoreCache();
        DataCache cache = storeCache.getDelegate();
        PCData data = cache.get(internalOid);
        ClassMetaData meta = JPAFacadeHelper.getMetaData(emf,
            AllFieldTypes.class);
        Object cachedFieldData =
            data.getData(meta.getField("arrayOfInts").getIndex());
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.StoreCacheImpl

Copyright © 2018 www.massapicom. 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.