Examples of CacheObjectAChild1


Examples of org.apache.openjpa.persistence.datacache.common.apps.CacheObjectAChild1

        for (int i = 0; i < 10; i++) {
            // make some common names so that GROUP BY is useful.
            if (i % 2 == 0)
                j++;
            CacheObjectA o;
            broker.persist(o = new CacheObjectAChild1("", "results-" + j, i),
                null);

            o.setDate(new Date());
            o.setDateArray(new Date[]{ new Date(10), new Date(20) });
View Full Code Here

Examples of org.apache.openjpa.persistence.datacache.common.apps.CacheObjectAChild1

            broker.newQuery(JPQLParser.LANG_JPQL, "select a FROM " +
                CacheObjectAChild1.class.getSimpleName() +
                " a  where a.age =1");

        q.setUnique(true);
        CacheObjectAChild1 a = (CacheObjectAChild1) q.execute();
        CacheTestHelper.assertInCache(this, q, Boolean.TRUE);

        CacheObjectAChild1 a2 = (CacheObjectAChild1) q.execute();
        assertTrue(a == a2);
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.datacache.common.apps.CacheObjectAChild1

        EntityManagerFactory emf = getEmf(propsMap);
        _factory = JPAFacadeHelper.toBrokerFactory(emf);
        Broker broker = _factory.newBroker();
        broker.begin();
        for (int i = 0; i < 50; i++)
            broker.persist(new CacheObjectAChild1("", "JPQL2Queries", i),
                null);
        broker.commit();
        broker.close();

        CacheTestHelper.cacheManager(_factory).getSystemQueryCache().clear();
View Full Code Here

Examples of org.apache.openjpa.persistence.datacache.common.apps.CacheObjectAChild1

        EntityManagerFactory emf = getEmf(propsMap);
        BrokerFactory factory = JPAFacadeHelper.toBrokerFactory(emf);

        Broker broker = factory.newBroker();
        broker.begin();
        broker.persist(new CacheObjectAChild1("foo", "foo", 0), null);
        broker.persist(new CacheObjectAChild1("bar", "bar", 1), null);
        broker.commit();
        broker.close();

        _broker = factory.newBroker();
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.datacache.common.apps.CacheObjectAChild1

        _startDate = new java.text.SimpleDateFormat("dd/MM/yyyy").
            parse("01/01/1990");
        Broker broker = _factory.newBroker();
        broker.begin();
        for (int i = 0; i < 50; i++) {
            CacheObjectAChild1 o = new CacheObjectAChild1
                ("", "JPQL2Queries", i);
            o.setDate(_startDate);
            broker.persist(o, null);
        }
        broker.commit();
        broker.close();
View Full Code Here

Examples of org.apache.openjpa.persistence.datacache.common.apps.CacheObjectAChild1

        for (int i = 0; i < 10; i++) {
            // make some common names so that GROUP BY is useful.
            if (i % 2 == 0)
                j++;
            CacheObjectA o;
            broker.persist(o = new CacheObjectAChild1("", "results-" + j, i),
                null);

            o.setDate(new Date());
            o.setDateArray(new Date[]{ new Date(10), new Date(20) });
View Full Code Here

Examples of org.apache.openjpa.persistence.datacache.common.apps.CacheObjectAChild1

            broker.newQuery(JPQLParser.LANG_JPQL, "select a FROM " +
                CacheObjectAChild1.class.getSimpleName() +
                " a  where a.age =1");

        q.setUnique(true);
        CacheObjectAChild1 a = (CacheObjectAChild1) q.execute();
        CacheTestHelper.assertInCache(this, q, Boolean.TRUE);

        CacheObjectAChild1 a2 = (CacheObjectAChild1) q.execute();
        assertTrue(a == a2);
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.datacache.common.apps.CacheObjectAChild1

        EntityManagerFactory emf = getEmf(propsMap);
        BrokerFactory factory = JPAFacadeHelper.toBrokerFactory(emf);

        Broker broker = factory.newBroker();
        broker.begin();
        broker.persist(new CacheObjectAChild1("foo", "foo", 0), null);
        broker.persist(new CacheObjectAChild1("bar", "bar", 1), null);
        broker.commit();
        broker.close();

        _broker = factory.newBroker();
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.datacache.common.apps.CacheObjectAChild1

        _startDate = new java.text.SimpleDateFormat("dd/MM/yyyy").
            parse("01/01/1990");
        Broker broker = _factory.newBroker();
        broker.begin();
        for (int i = 0; i < 50; i++) {
            CacheObjectAChild1 o = new CacheObjectAChild1
                ("", "JPQL2Queries", i);
            o.setDate(_startDate);
            broker.persist(o, null);
        }
        broker.commit();
        broker.close();
View Full Code Here

Examples of org.apache.openjpa.persistence.datacache.common.apps.CacheObjectAChild1

        EntityManagerFactory emf = getEmf(propsMap);
        BrokerFactory factory = JPAFacadeHelper.toBrokerFactory(emf);

        Broker broker = factory.newBroker();
        broker.begin();
        broker.persist(new CacheObjectAChild1("foo", "foo", 0), null);
        broker.persist(new CacheObjectAChild1("bar", "bar", 1), null);
        broker.commit();
        broker.close();

        _broker = factory.newBroker();
    }
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.