Package org.odmg

Examples of org.odmg.Transaction.checkpoint()


        ProductGroup pg1 = new ProductGroup();
        pg1.setName("BatchModeTest ProductGroup #1");
        database.makePersistent(pg1);

        tx.checkpoint();

        Article a1 = Article.createInstance();
        a1.setArticleName("BatchModeTest Article #1");
        a1.setProductGroup(pg1);
        pg1.addArticle(a1);
View Full Code Here


        Article a2 = Article.createInstance();
        a2.setArticleName("BatchModeTest Article #2");
        a2.setProductGroup(pg2);
        pg2.addArticle(a2);

        tx.checkpoint();

        database.deletePersistent(a1);

        tx.checkpoint();
View Full Code Here

        tx.checkpoint();

        database.deletePersistent(a1);

        tx.checkpoint();

        database.deletePersistent(pg1);
        database.deletePersistent(a2);
        database.deletePersistent(pg2);
View Full Code Here

        database.deletePersistent(pg1);
        database.deletePersistent(a2);
        database.deletePersistent(pg2);

        tx.checkpoint();
        tx.commit();
    }
}
View Full Code Here

        Transaction tx = odmg.newTransaction();
        tx.begin();
        storeObjects(tx, getNewODMGZoos("testUserRollbackWithCheckpoint", 10));
        // now we store objects to DB
        tx.checkpoint();
        storeObjects(tx, getNewProjects("testUserRollbackWithCheckpoint", 10));
        //we abort tx, all actions after the last checkpoint call should be rollback
        tx.abort();

        int odmgZoosAfter = getDBObjectCountWithNewPB(ODMGZoo.class);
View Full Code Here

        projectsBefore = getDBObjectCountWithNewPB(Project.class);
        // we reuse current tx
        tx.begin();
        storeObjects(tx, getNewODMGZoos("testUserRollbackWithCheckpoint", 10));
        // now we store objects to DB
        tx.checkpoint();
        storeObjects(tx, getNewProjects("testUserRollbackWithCheckpoint", 10));
        //we abort tx, all actions after the last checkpoint call should be rollback
        tx.abort();

        odmgZoosAfter = getDBObjectCountWithNewPB(ODMGZoo.class);
View Full Code Here

        tx.begin();
        tx.abort();

        tx = odmg.newTransaction();
        tx.begin();
        tx.checkpoint();
        tx.checkpoint();
        tx.abort();

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

        tx.abort();

        tx = odmg.newTransaction();
        tx.begin();
        tx.checkpoint();
        tx.checkpoint();
        tx.abort();

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

        tx.checkpoint();
        tx.abort();

        tx = odmg.newTransaction();
        tx.begin();
        tx.checkpoint();
        tx.checkpoint();
        tx.commit();

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

        tx.abort();

        tx = odmg.newTransaction();
        tx.begin();
        tx.checkpoint();
        tx.checkpoint();
        tx.commit();

        tx = odmg.newTransaction();
        tx.begin();
        tx.commit();
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.