Package org.apache.openjpa.kernel

Examples of org.apache.openjpa.kernel.Broker.find()


        });
       
        // get obj into cache
        Broker broker = factory.newBroker();
        try {
            broker.find(_pc, true, null);
        } finally {
            broker.close();
        }
       
        // test from cache
View Full Code Here


    }

    public void testPCParameter() {
        Broker broker = _factory.newBroker();
        broker.begin();
        CacheObjectE e = (CacheObjectE) broker.find(_eId, true, null);
        Query q = broker.newQuery(JPQLParser.LANG_JPQL,
            "select a from " +
                CacheObjectJ.class.getSimpleName() + " a where a.e = :param");

        Collection c = (Collection) q.execute(new Object[]{ e });
View Full Code Here

        });
       
        // get obj into cache
        Broker broker = factory.newBroker();
        try {
            broker.find(_pc, true, null);
        } finally {
            broker.close();
        }
       
        // test from cache
View Full Code Here

        broker.close();

        broker = getBrokerFactory().newBroker();
        broker.begin();
        sql.clear();
        pta = (PlaceholderTypesA) broker.find(oida, true, null);
        assertEquals(1, pta.getIntA());
        if (_union)
            assertEquals(1, sql.size());
        else
            assertNotSQL("UNION");
View Full Code Here

        broker.close();

        broker = getBrokerFactory().newBroker();
        broker.begin();
        sql.clear();
        ptb = (PlaceholderTypesB) broker.find(broker.newObjectId
            (PlaceholderTypesB.class, new Long(idb)), true, null);
        assertEquals(2, ptb.getIntA());
        assertEquals(3, ptb.getIntB());
        assertTrue(ptb.getBooleanB());
        assertEquals(64, ptb.getByteB());
View Full Code Here

        broker.close();

        broker = getBrokerFactory().newBroker();
        broker.begin();
        sql.clear();
        pta = (PlaceholderTypesA) broker.find(oida, true, null);
        assertEquals(1, pta.getIntA());
        if (_union)
            assertEquals(1, sql.size());
        else
            assertNotSQL("UNION");
View Full Code Here

        broker.close();

        broker = getBrokerFactory().newBroker();
        broker.begin();
        sql.clear();
        ptb = (PlaceholderTypesB) broker.find(broker.newObjectId
            (PlaceholderTypesB.class, new Long(idb)), true, null);
        assertEquals(2, ptb.getIntA());
        assertEquals(3, ptb.getIntB());
        assertTrue(ptb.getBooleanB());
        assertEquals(64, ptb.getByteB());
View Full Code Here

        broker.close();

        broker = getBrokerFactory().newBroker();
        broker.begin();
        sql.clear();
        pta = (PlaceholderTypesA) broker.find(oida, true, null);
        assertEquals(1, pta.getIntA());
        if (_union)
            assertEquals(1, sql.size());
        else
            assertNotSQL("UNION");
View Full Code Here

        broker.close();

        broker = getBrokerFactory().newBroker();
        broker.begin();
        sql.clear();
        ptb = (PlaceholderTypesB) broker.find(broker.newObjectId
            (PlaceholderTypesB.class, new Long(idb)), true, null);
        assertEquals(2, ptb.getIntA());
        assertEquals(3, ptb.getIntB());
        assertTrue(ptb.getBooleanB());
        assertEquals(64, ptb.getByteB());
View Full Code Here

        });
       
        // get obj into cache
        Broker broker = factory.newBroker();
        try {
            broker.find(_pc, true, null);
        } finally {
            broker.close();
        }
       
        // test from cache
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.