Package org.odmg

Examples of org.odmg.Database.bind()


        Transaction tx = odmg.newTransaction();
        tx.begin();
        try
        {
            db.bind(example, bindingName);
            Article value = (Article) db.lookup(bindingName);
            assertTrue("Could not lookup object for binding name: "+bindingName, value != null);
            tx.commit();
        }
        catch (ObjectNameNotFoundException ex)
View Full Code Here


        }

        try
        {
            tx.begin();
            db.bind(example, bindingName);
            tx.commit();
            fail("We expected a ObjectNameNotUniqueException, but was not thrown");
        }
        catch (ObjectNameNotUniqueException ex)
        {
View Full Code Here

        Database db = odmg.newDatabase();
        //open database
        db.open(databaseName, Database.OPEN_READ_WRITE);
        Transaction tx = odmg.newTransaction();
        tx.begin();
        db.bind(odmg.newDList(), bindingName);

        foundList = (DList)db.lookup(bindingName);
        assertTrue("Could not found bound DList", foundList != null);
        foundList = null;
View Full Code Here

        }
        catch (ObjectNameNotFoundException ex)
        {
        }

        db.bind(odmg.newDList(), bindingName);
        try
        {
            foundList = (DList) db.lookup(bindingName);
        }
        catch (ObjectNameNotFoundException ex)
View Full Code Here

        Article example = createArticle();
        Identity oid = new Identity(example, ((HasBroker)tx).getBroker());

        try
        {
            db.bind(example, bindingName);
            tx.commit();
        }
        catch (ObjectNameNotUniqueException ex)
        {
            tx.abort();
View Full Code Here

        Article example = createArticle();

        try
        {
            db.bind(example, name);
            tx.commit();
        }
        catch (ObjectNameNotUniqueException ex)
        {
            tx.abort();
View Full Code Here

//            OJB.getLogger().debug(results);

            String name = "gimme fruits_" + System.currentTimeMillis();

            db.bind(results, name);
            tx.commit();

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

//            OJB.getLogger().debug(results);

            String name = "gimme fruits_" + System.currentTimeMillis();

            db.bind(results, name);
            tx.commit();

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

        Transaction tx = odmg.newTransaction();
        tx.begin();
        // create DList and bound by name
        DList list = odmg.newDList();
        db.bind(list, name);
        tx.commit();
        tx = odmg.newTransaction();
        tx.begin();
        Object obj = db.lookup(name);
        tx.commit();
View Full Code Here

        {
            DListObject a = createObject(name);
            list.add(a);
        }
        // bind the new list
        db.bind(list, name);
        tx.commit();

        tx = odmg.newTransaction();
        tx.begin();
        Object obj = db.lookup(name);
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.