Examples of newOQLQuery()


Examples of org.apache.ojb.otm.OTMConnection.newOQLQuery()

        try
        {
            conn = kit.acquireConnection(PersistenceBrokerFactory.getDefaultKey());
            tx   = kit.getTransaction(conn);

            OQLQuery oql = conn.newOQLQuery();

            oql.create(query);

            if (queryParams != null)
            {
View Full Code Here

Examples of org.apache.ojb.otm.OTMConnection.newOQLQuery()

        try
        {
            conn = kit.acquireConnection(PersistenceBrokerFactory.getDefaultKey());
            tx   = kit.getTransaction(conn);

            OQLQuery oql = conn.newOQLQuery();

            oql.create(query);

            if (queryParams != null)
            {
View Full Code Here

Examples of org.odmg.Implementation.newOQLQuery()

        Implementation impl = OJB.getInstance();
        Transaction    tx   = impl.newTransaction();

        tx.begin();

        OQLQuery query = impl.newOQLQuery();

        query.create("select products from " + Product.class.getName() + " where name = $1");
        query.bind(name);

        DList   results = (DList)query.execute();
View Full Code Here

Examples of org.odmg.Implementation.newOQLQuery()

        //perform transaction
        try
        {
            tx.begin();

            OQLQuery query = odmg.newOQLQuery();
            query.create("select anArticle from " + Article.class.getName() + " where articleId = 60");
            List results = (List) query.execute();

            Article a = (Article) results.get(0);
View Full Code Here

Examples of org.odmg.Implementation.newOQLQuery()

        Transaction tx = odmg.newTransaction();

        // perform transaction
        tx.begin();

        OQLQuery query = odmg.newOQLQuery();
        // use 'like' instead of '=' when perform query with wildcards
        query.create(
                "select anArticle from " + Article.class.getName() + " where productGroup.groupName like \"Fruit*\"");
        List results = (List) query.execute();

View Full Code Here

Examples of org.odmg.Implementation.newOQLQuery()

        query.create(
                "select anArticle from " + Article.class.getName() + " where productGroup.groupName like \"Fruit*\"");
        List results = (List) query.execute();

        // crosscheck
        query = odmg.newOQLQuery();
        query.create("select aPG from " + ProductGroup.class.getName() + " where groupName like \"Fruit*\"");
        List check = (List) query.execute();
        if (check.size() < 1)
            fail("Could not found ProductGroup's for: " +
                    "select aPG from " + ProductGroup.class.getName() + " where groupName like \"Fruit*\"");
 
View Full Code Here

Examples of org.odmg.Implementation.newOQLQuery()

        //perform transaction
        try
        {
            tx.begin();

            OQLQuery query = odmg.newOQLQuery();
            query.create("select x from " + Article.class.getName() + " where productGroupId = 7");
            DList results = (DList) query.execute();

            int originalSize = results.size();
            assertTrue("result count have to be > 0", originalSize > 0);
View Full Code Here

Examples of org.odmg.Implementation.newOQLQuery()

        //perform transaction
        try
        {
            tx.begin();

            OQLQuery query = odmg.newOQLQuery();
            query.create("select anArticle from " + Article.class.getName() + " where articleId = $678");
            query.bind(new Integer(30));

            List results = (List) query.execute();
View Full Code Here

Examples of org.odmg.Implementation.newOQLQuery()

        //perform transaction
        try
        {
            tx.begin();
            OQLQuery query = odmg.newOQLQuery();
            query.create("select aLotOfArticles from " + Article.class.getName() + " where productGroupId = 4");

            DCollection results = (DCollection) query.execute();
            results = results.query("price > 35");
View Full Code Here

Examples of org.odmg.Implementation.newOQLQuery()

            DCollection results = (DCollection) query.execute();
            results = results.query("price > 35");

            // now perform control query
            query = odmg.newOQLQuery();
            query.create(
                    "select aLotOfArticles from "
                    + Article.class.getName()
                    + " where productGroupId = 4 and price  > 35");
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.