Package org.odmg

Examples of org.odmg.OQLQuery.bind()


        tx.begin();
        ((TransactionExt)tx).getBroker().clearCache();
        query = odmg.newOQLQuery();
        query.create(queryStr);
        query.bind(name);
        result = (Collection) query.execute();
        assertNotNull(result);
        assertEquals(2, result.size());

        for (Iterator iterator = result.iterator(); iterator.hasNext();)
View Full Code Here


        tx.getBroker().clearCache();
        // check if gatherer was stored
        OQLQuery query = odmg.newOQLQuery();
        query.create(queryStr);
        assertNotNull(gat.getGatId());
        query.bind(gat.getGatId());
        Collection result = (Collection) query.execute();
        tx.commit();
        assertEquals("Wrong number of objects found", 1, result.size());
        Gatherer fetchedGat = (Gatherer) result.iterator().next();
View Full Code Here

        tx.begin();
        tx.getBroker().clearCache();
        // now check if the modification was stored
        query = odmg.newOQLQuery();
        query.create(queryMod);
        query.bind(modifiedName);
        result = (Collection) query.execute();
        tx.commit();
        assertEquals("Wrong number of objects found", 1, result.size());
        CollectibleA collA = (CollectibleA) result.iterator().next();
        assertNotNull(collA);
View Full Code Here

        tx.begin();
        tx.getBroker().clearCache();
        OQLQuery query = odmg.newOQLQuery();
        query.create(queryStr);
        assertNotNull(gat.getGatId());
        query.bind(gat.getGatId());
        query.bind(gat2.getGatId());
        Collection result = (Collection) query.execute();
        tx.commit();
        assertEquals("Wrong number of objects found", 2, result.size());
        Iterator it = result.iterator();
View Full Code Here

        tx.getBroker().clearCache();
        OQLQuery query = odmg.newOQLQuery();
        query.create(queryStr);
        assertNotNull(gat.getGatId());
        query.bind(gat.getGatId());
        query.bind(gat2.getGatId());
        Collection result = (Collection) query.execute();
        tx.commit();
        assertEquals("Wrong number of objects found", 2, result.size());
        Iterator it = result.iterator();
        Gatherer fetchedGat = (Gatherer) it.next();
View Full Code Here

        tx.begin();
        tx.getBroker().clearCache();
        query = odmg.newOQLQuery();
        query.create(queryStr);
        assertNotNull(gat.getGatId());
        query.bind(gat.getGatId());
        query.bind(gat2.getGatId());
        result = (Collection) query.execute();
        tx.commit();
        assertEquals("Wrong number of objects found", 2, result.size());
        it = result.iterator();
View Full Code Here

        tx.getBroker().clearCache();
        query = odmg.newOQLQuery();
        query.create(queryStr);
        assertNotNull(gat.getGatId());
        query.bind(gat.getGatId());
        query.bind(gat2.getGatId());
        result = (Collection) query.execute();
        tx.commit();
        assertEquals("Wrong number of objects found", 2, result.size());
        it = result.iterator();
        fetchedGat = (Gatherer) it.next();
View Full Code Here

        tx.getBroker().clearCache();
        assertNotNull(gat.getGatId());

        OQLQuery query = odmg.newOQLQuery();
        query.create(queryGat);
        query.bind(gat.getGatId());

        Collection result = (Collection) query.execute();
        tx.commit();
        assertEquals("Wrong number of objects found", 1, result.size());
        Gatherer fetchedGat = (Gatherer) result.iterator().next();
View Full Code Here

        tx.getBroker().clearCache();

        query = odmg.newOQLQuery();
        query.create("select colls from " + CollectibleC.class.getName() +
                " where name like $1");
        query.bind(prefix + "%");
        result = (Collection) query.execute();
        assertEquals("Wrong number of objects found", 2, result.size());
        tx.commit();

        // check if the gatherer now contains a CollectibleBase list
View Full Code Here

        // check if the gatherer now contains a CollectibleBase list
        // reduced by the deleted
        tx.begin();
        query = odmg.newOQLQuery();
        query.create(queryGat);
        query.bind(gat.getGatId());
        result = (Collection) query.execute();
        assertEquals("Wrong number of objects found", 1, result.size());
        fetchedGat = (Gatherer) result.iterator().next();
        colC = fetchedGat.getCollectiblesC();
        assertEquals("Wrong number of CollectiblesA found in Gatherer", 2, colC.size());
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.