Package org.odmg

Examples of org.odmg.Database.makePersistent()


        Transaction tx = odmg.newTransaction();

        tx.begin();

        // 4. make persistent new object
        db.makePersistent(newProduct);

        // 5. commit transaction
        tx.commit();
    }
}
View Full Code Here


        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);
        db.makePersistent(s_ref_2);
        db.makePersistent(s_ref_3);
        db.makePersistent(s_ref_4);

        db.makePersistent(obj_1);
View Full Code Here

        db.open(TestHelper.DEF_DATABASE_NAME, Database.OPEN_READ_WRITE);

        Transaction tx = odmg.newTransaction();
        tx.begin();
        db.makePersistent(s_ref_1);
        db.makePersistent(s_ref_2);
        db.makePersistent(s_ref_3);
        db.makePersistent(s_ref_4);

        db.makePersistent(obj_1);
        db.makePersistent(obj_2);
View Full Code Here

        Transaction tx = odmg.newTransaction();
        tx.begin();
        db.makePersistent(s_ref_1);
        db.makePersistent(s_ref_2);
        db.makePersistent(s_ref_3);
        db.makePersistent(s_ref_4);

        db.makePersistent(obj_1);
        db.makePersistent(obj_2);
        tx.commit();
View Full Code Here

        Transaction tx = odmg.newTransaction();
        tx.begin();
        db.makePersistent(s_ref_1);
        db.makePersistent(s_ref_2);
        db.makePersistent(s_ref_3);
        db.makePersistent(s_ref_4);

        db.makePersistent(obj_1);
        db.makePersistent(obj_2);
        tx.commit();
View Full Code Here

        db.makePersistent(s_ref_1);
        db.makePersistent(s_ref_2);
        db.makePersistent(s_ref_3);
        db.makePersistent(s_ref_4);

        db.makePersistent(obj_1);
        db.makePersistent(obj_2);
        tx.commit();

        // try to find both objects
        Criteria crit = new Criteria();
View Full Code Here

        db.makePersistent(s_ref_2);
        db.makePersistent(s_ref_3);
        db.makePersistent(s_ref_4);

        db.makePersistent(obj_1);
        db.makePersistent(obj_2);
        tx.commit();

        // try to find both objects
        Criteria crit = new Criteria();
        crit.addEqualTo("name", name);
View Full Code Here

        Transaction tx = odmg.newTransaction();

        tx.begin();

        // 4. make persistent new object
        db.makePersistent(newProduct);

        // 5. commit transaction
        tx.commit();
    }
}
View Full Code Here

        Transaction tx = odmg.newTransaction();
        long start = System.currentTimeMillis();
        tx.begin();
        for (int i = 0; i < articleCount; i++)
        {
            db.makePersistent(arr[i]);
        }
        tx.commit();
        long stop = System.currentTimeMillis();
        db.close();
        logger.info("inserting " + articleCount + " Objects: " + (stop - start) + " msec");
View Full Code Here

        a.setPk("A" + currentTime);
        BidirectionalAssociationObjectB b = new BidirectionalAssociationObjectB();
        b.setPk("B" + currentTime);

        tx.begin();
        db.makePersistent(a);
        db.makePersistent(b);
        tx.commit();

        tx.begin();
        tx.lock(a, Transaction.WRITE);
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.