Examples of RuntimeTest1


Examples of org.apache.openjpa.persistence.common.apps.RuntimeTest1

        int run1 = 10;
        int run2 = 15;

        for (int i = 0; i < run1; i++) {
            RuntimeTest1 rt = new RuntimeTest1(i);
            rt.setStringField("foo " + i);
            em.persist(rt);
        }

        for (int i = 10; i < run2; i++) {
            em.persist(new RuntimeTest2(i));
View Full Code Here

Examples of org.apache.openjpa.persistence.common.apps.RuntimeTest1

        int run1 = 10;
        int run2 = 15;

        for (int i = 0; i < run1; i++) {
            RuntimeTest1 rt = new RuntimeTest1(i);
            rt.setStringField("foo " + i);
            em.persist(rt);
        }

        for (int i = 10; i < run2; i++) {
            em.persist(new RuntimeTest2(i));
View Full Code Here

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

    public void testQueryImplicitEvictions() throws Exception {
        OpenJPAEntityManager em = (OpenJPAEntityManager) factory
            .createEntityManager();
        try {
            RuntimeTest1[] helperObjs = new RuntimeTest1[5];
            helperObjs[0] = new RuntimeTest1();
            helperObjs[1] = new RuntimeTest1();
            helperObjs[2] = new RuntimeTest1();
            helperObjs[3] = new RuntimeTest1();
            helperObjs[4] = new RuntimeTest1();
            startTx(em);
            em.persist(helperObjs[0]);
            em.persist(helperObjs[1]);
            em.persist(helperObjs[2]);
            em.persist(helperObjs[3]);
View Full Code Here

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

    public void testQueryImplicitEvictions() throws Exception {
        OpenJPAEntityManager em = (OpenJPAEntityManager) factory
            .createEntityManager();
        try {
            RuntimeTest1[] helperObjs = new RuntimeTest1[5];
            helperObjs[0] = new RuntimeTest1();
            helperObjs[1] = new RuntimeTest1();
            helperObjs[2] = new RuntimeTest1();
            helperObjs[3] = new RuntimeTest1();
            helperObjs[4] = new RuntimeTest1();
            startTx(em);
            em.persist(helperObjs[0]);
            em.persist(helperObjs[1]);
            em.persist(helperObjs[2]);
            em.persist(helperObjs[3]);
View Full Code Here

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

    protected void performLoadAll(OpenJPAEntityManager pm)
    // load in (and thus cache) all the 1s and 2s
    {
        startTx(pm);
        RuntimeTest1 temp1;
        Collection runtime1s = (Collection) pm
            .createQuery("SELECT a FROM RuntimeTest1 a").getResultList();

        for (Iterator itr = runtime1s.iterator(); itr.hasNext();)
            temp1 = (RuntimeTest1) itr.next();
View Full Code Here

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

        startTx(pm);
        // create objects
        RuntimeTest1[] persistables = new RuntimeTest1[numObjects];
        _runtime1sOids = new Object[numObjects];
        for (int i = 0; i < persistables.length; i++) {
            persistables[i] = new RuntimeTest1("foo #" + i, i);
            pm.persist(persistables[i]);
            _runtime1sOids[i] = pm.getObjectId(persistables[i]);
            if (i == 0) {
                persistables[i].setStringField("SpecialRuntimeTest1");
                spec_oid = pm.getObjectId(persistables[i]);
View Full Code Here

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

            pm = (OpenJPAEntityManager) kpmf.createEntityManager();
            if (asLarge)
                //pm.setLargeTransaction(true);
                pm.setTrackChangesByType(true);
            startTx(pm);
            RuntimeTest1 special = pm.find(RuntimeTest1.class, spec_oid);
            assertNotNull(special);
            special.setStringField("SpeicalRuntimeTest1_MODIFIED");

            endTx(pm);
            endEm(pm);
        }
View Full Code Here

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

            pm = (OpenJPAEntityManager) kpmf.createEntityManager();
            if (asLarge)
                //pm.setLargeTransaction(true);
                pm.setTrackChangesByType(true);
            startTx(pm);
            RuntimeTest1 specialObj = pm.find(RuntimeTest1.class, spec_oid);
            assertNotNull(specialObj);

            pm.remove(specialObj);

            endTx(pm);
View Full Code Here

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

    public void testQueryImplicitEvictions() throws Exception {
        OpenJPAEntityManager em = (OpenJPAEntityManager) factory
            .createEntityManager();
        try {
            RuntimeTest1[] helperObjs = new RuntimeTest1[5];
            helperObjs[0] = new RuntimeTest1();
            helperObjs[1] = new RuntimeTest1();
            helperObjs[2] = new RuntimeTest1();
            helperObjs[3] = new RuntimeTest1();
            helperObjs[4] = new RuntimeTest1();
            startTx(em);
            em.persist(helperObjs[0]);
            em.persist(helperObjs[1]);
            em.persist(helperObjs[2]);
            em.persist(helperObjs[3]);
View Full Code Here

Examples of org.apache.openjpa.persistence.event.common.apps.RuntimeTest1

        timeToAMD.start();

        // create objects
        RuntimeTest1[] persistables = new RuntimeTest1[numObjects];
        for (int i = 0; i < persistables.length; i++) {
            persistables[i] = new RuntimeTest1("foo #" + i, i);
        }

        // add them
        for (int i = 0; i < persistables.length; i++) {
            startTx(pm);
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.