Package org.odmg

Examples of org.odmg.Implementation.newDatabase()


        Implementation odmg = OJB.getInstance();
        Transaction tx;
        Database db = odmg.newDatabase();
        db.open(TestHelper.DEF_JCD_ALIAS, Database.OPEN_READ_WRITE);
        db.close();
        db = odmg.newDatabase();
        db.open(TestHelper.DEF_JCD_ALIAS + "#" +
                TestHelper.DEF_USER + "#" +
                TestHelper.DEF_PASSWORD, Database.OPEN_READ_WRITE);
        tx = odmg.newTransaction();
        tx.begin();
View Full Code Here


        query.create(queryStr);
        query.execute();
        tx.commit();
        db.close();

        db = odmg.newDatabase();
        db.open(TestHelper.DEF_JCD_ALIAS, Database.OPEN_READ_WRITE);
        tx = odmg.newTransaction();
        tx.begin();
        OQLQuery query2 = odmg.newOQLQuery();
        query2.create(queryStr);
View Full Code Here

        MainObject obj_1 = new MainObject(null, name);
        MainObject obj_2 = new MainObject(null, name);
        MainObject obj_3 = new MainObject(null, name);

        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(TestHelper.DEF_DATABASE_NAME, Database.OPEN_READ_WRITE);

        Transaction tx = odmg.newTransaction();
        tx.begin();
        tx.lock(obj_1, Transaction.WRITE);
View Full Code Here

        MainObject obj_2 = new MainObject(null, name);
        SingleReference s_ref_4 = new SingleReference(nameSingleRef);
        obj_2.setSingleReference(s_ref_4);

        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(TestHelper.DEF_DATABASE_NAME, Database.OPEN_READ_WRITE);

        TransactionExt tx = (TransactionExt) odmg.newTransaction();
        tx.begin();
        db.makePersistent(s_ref_4);
View Full Code Here

        obj_1.setSingleReference(s_ref_3);
        obj_2.setSingleReference(s_ref_4);

        Implementation odmg = OJB.getInstance();
        Database db = odmg.newDatabase();
        db.open(TestHelper.DEF_DATABASE_NAME, Database.OPEN_READ_WRITE);

        Transaction tx = odmg.newTransaction();
        tx.begin();
        db.makePersistent(s_ref_1);
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.