Package org.odmg

Examples of org.odmg.OQLQuery.execute()


        tx.begin();
        tx.getBroker().clearCache();
        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());
        tx.commit();
View Full Code Here


        OQLQuery query = odmg.newOQLQuery();
        query.create(queryStr);
        Integer gatId = gat.getGatId();
        assertNotNull(gatId);
        query.bind(gatId);
        Collection result = (Collection) query.execute();
        tx.commit();
        assertEquals("Wrong number of objects found", 1, result.size());
        Gatherer fetchedGat = (Gatherer) result.iterator().next();

        List colsA = fetchedGat.getCollectiblesA();
View Full Code Here

        tx.begin();
        query = odmg.newOQLQuery();
        query.create("select allCollectibleA from " + CollectibleA.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
        // reduced by the deleted
View Full Code Here

        // reduced by the deleted
        tx.begin();
        query = odmg.newOQLQuery();
        query.create(queryStr);
        query.bind(gatId);
        result = (Collection) query.execute();
        assertEquals("Wrong number of objects found", 1, result.size());
        fetchedGat = (Gatherer) result.iterator().next();
        colsA = fetchedGat.getCollectiblesA();
        assertEquals("Wrong number of CollectiblesA found in Gatherer", 2, colsA.size());
        tx.commit();
View Full Code Here

        OQLQuery query = odmg.newOQLQuery();
        query.create(queryStr);
        Integer gatId = gat.getGatId();
        assertNotNull(gatId);
        query.bind(gatId);
        Collection result = (Collection) query.execute();

        assertEquals("Wrong number of objects found", 1, result.size());
        Gatherer fetchedGat = (Gatherer) result.iterator().next();
        //*************************************
        tx.lock(fetchedGat, Transaction.WRITE);
View Full Code Here

        query = odmg.newOQLQuery();
        query.create(queryStr);
        gatId = gat.getGatId();
        assertNotNull(gatId);
        query.bind(gatId);
        result = (Collection) query.execute();
        tx.commit();
        assertEquals("Wrong number of objects found", 1, result.size());
        fetchedGat = (Gatherer) result.iterator().next();

        assertNotNull(fetchedGat.getCollectiblesA());
View Full Code Here

        OQLQuery query = odmg.newOQLQuery();
        query.create(queryStr);
        Integer gatId = gat.getGatId();
        assertNotNull(gatId);
        query.bind(gatId);
        Collection result = (Collection) query.execute();
        tx.commit();

        assertEquals("Wrong number of objects found", 1, result.size());
        Gatherer fetchedGat = (Gatherer) result.iterator().next();
        assertNotNull(fetchedGat.getCollectiblesA());
View Full Code Here

        query = odmg.newOQLQuery();
        query.create(queryStr);
        gatId = gat.getGatId();
        assertNotNull(gatId);
        query.bind(gatId);
        result = (Collection) query.execute();
        tx.commit();
        assertEquals("Wrong number of objects found", 1, result.size());
        fetchedGat = (Gatherer) result.iterator().next();

        assertNotNull(fetchedGat.getCollectiblesA());
View Full Code Here

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

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

        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());

        // we don't want that Gatherer does some cascade delete
        tx.setCascadingDelete(Gatherer.class, false);
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.