Package org.odmg

Examples of org.odmg.OQLQuery.bind()


        // increased by the added
        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());
View Full Code Here


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

        // check if the CollectibleBase was really deleted from DB
        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
View Full Code Here

        // check if the gatherer now contains a CollectibleBase list
        // 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());
View Full Code Here

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

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

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

        tx.getBroker().clearCache();
        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();
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
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.