Package org.odmg

Examples of org.odmg.OQLQuery.execute()


        tx.getBroker().clearCache();

        OQLQuery query = odmg.newOQLQuery();
        query.create("select products from " + Shop.class.getName() + " where name like $1");
        query.bind(name + "%");
        Collection result = (Collection) query.execute();
        tx.commit();

        assertEquals(1, result.size());
        Shop newShop = (Shop) result.iterator().next();
        assertNotNull(newShop.getProducts());
View Full Code Here


        tx.begin();
        tx.getBroker().clearCache();
        query = odmg.newOQLQuery();
        query.create("select products from " + Product.class.getName() + " where name like $1");
        query.bind(name + "_subPro%");
        result = (Collection) query.execute();
        assertEquals(3, result.size());

        query = odmg.newOQLQuery();
        query.create("select products from " + Product.class.getName() + " where name like $1");
        query.bind(name + "_product_1");
View Full Code Here

        assertEquals(3, result.size());

        query = odmg.newOQLQuery();
        query.create("select products from " + Product.class.getName() + " where name like $1");
        query.bind(name + "_product_1");
        result = (Collection) query.execute();
        assertEquals(0, result.size());

        tx.commit();
    }
View Full Code Here

        tx.getBroker().clearCache();

        OQLQuery query = odmg.newOQLQuery();
        query.create("select products from " + Shop.class.getName() + " where name like $1");
        query.bind(name + "%");
        Collection result = (Collection) query.execute();
        tx.commit();

        assertEquals(1, result.size());
        Shop newShop = (Shop) result.iterator().next();
        assertNotNull(newShop.getProducts());
View Full Code Here

        tx.begin();
        tx.getBroker().clearCache();
        query = odmg.newOQLQuery();
        query.create("select products from " + Product.class.getName() + " where name like $1");
        query.bind(name + "_subPro%");
        result = (Collection) query.execute();
        assertEquals(0, result.size());

        query = odmg.newOQLQuery();
        query.create("select products from " + Product.class.getName() + " where name like $1");
        query.bind(name + "_product_1");
View Full Code Here

        assertEquals(0, result.size());

        query = odmg.newOQLQuery();
        query.create("select products from " + Product.class.getName() + " where name like $1");
        query.bind(name + "_product_1");
        result = (Collection) query.execute();
        assertEquals(0, result.size());

        tx.commit();
    }
View Full Code Here

        tx.getBroker().clearCache();

        OQLQuery query = odmg.newOQLQuery();
        query.create("select detail from " + ShopDetail.class.getName() + " where name like $1");
        query.bind(name);
        Collection result = (Collection) query.execute();
        tx.commit();

        assertEquals(1, result.size());
        ShopDetail sdNew = (ShopDetail) result.iterator().next();
        assertNotNull(sdNew.getShop());
View Full Code Here

        tx.flush();

        query = odmg.newOQLQuery();
        query.create("select detail from " + ShopDetail.class.getName() + " where name like $1");
        query.bind(name);
        result = (Collection) query.execute();
        tx.commit();
        assertEquals(0, result.size());

        tx.begin();
        query = odmg.newOQLQuery();
View Full Code Here

        tx.begin();
        query = odmg.newOQLQuery();
        query.create("select detail from " + Shop.class.getName() + " where name like $1");
        query.bind(name);
        result = (Collection) query.execute();

        assertEquals(1, result.size());

        database.deletePersistent(result.iterator().next());
        tx.commit();
View Full Code Here

        tx.begin();
        OQLQuery query = odmg.newOQLQuery();
        query.create("select detail from " + ShopDetail.class.getName() + " where name like $1");
        query.bind(name);
        Collection result = (Collection) query.execute();
        tx.commit();

        assertEquals(1, result.size());
        ShopDetail sdNew = (ShopDetail) result.iterator().next();
        assertNotNull(sdNew.getShop());
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.