Package org.exolab.castor.jdo

Examples of org.exolab.castor.jdo.Database.load()


        Lazy1to1Parent parent = null;
       
        Database db = _category.getDatabase();
       
        db.begin();
        parent = (Lazy1to1Parent) db.load(Lazy1to1Parent.class, new Integer (1));
        db.commit();

        assertParent(parent, 1, "parent 1");
        Lazy1to1Child nature = parent.getChild();
        assertChild(nature, 1, "child 1");
View Full Code Here


        Lazy1to1Parent parent = null;
       
        Database db = _category.getDatabase();
       
        db.begin();
        parent = (Lazy1to1Parent) db.load(Lazy1to1Parent.class, new Integer (1),
                                          AccessMode.ReadOnly);
        db.commit();

        assertParent(parent, 1, "parent 1");
        Lazy1to1Child nature = parent.getChild();
View Full Code Here

        Lazy1to1Child nature = parent.getChild();
        assertChild(nature, 1, "child 1");

        // re-load to assert that nothing has changed
        db.begin();
        parent = (Lazy1to1Parent) db.load(Lazy1to1Parent.class, new Integer (1));
        db.commit();

        assertParent(parent, 1, "parent 1");
        assertChild(parent.getChild(), 1, "child 1");
View Full Code Here

        Lazy1to1Parent parent = null;
       
        Database db = _category.getDatabase();
       
        db.begin();
        parent = (Lazy1to1Parent) db.load(Lazy1to1Parent.class, new Integer (1),
                                          AccessMode.ReadOnly);

        assertParent(parent, 1, "parent 1");
        Lazy1to1Child nature = parent.getChild();
        assertChild(nature, 1, "child 1");
View Full Code Here

        db.commit();

        // re-load to assert that nothing has changed
        db.begin();
        parent = (Lazy1to1Parent) db.load(Lazy1to1Parent.class, new Integer (1));
        db.rollback();

        assertParent(parent, 1, "parent 1");
        assertChild(parent.getChild(), 1, "child 1");
View Full Code Here

        Lazy1to1Parent parent = null;
       
        Database db = _category.getDatabase();
       
        db.begin();
        parent = (Lazy1to1Parent) db.load(Lazy1to1Parent.class, new Integer (1));
        assertParent(parent, 1, "parent 1");
        db.commit();
       
        db.close();
    }
View Full Code Here

        Lazy1to1Parent parent = null;
       
        Database db = _category.getDatabase();
       
        db.begin();
        parent = (Lazy1to1Parent) db.load(Lazy1to1Parent.class, new Integer (1),
                                          AccessMode.ReadOnly);
        assertParent(parent, 1, "parent 1");
        db.commit();
       
        db.close();
View Full Code Here

        Lazy1to1Parent parent = null;
       
        Database db = _category.getDatabase();
       
        db.begin();
        parent = (Lazy1to1Parent) db.load(Lazy1to1Parent.class, new Integer (1));
        assertParent(parent, 1, "parent 1");
        assertChild(parent.getChild(), 1, "child 1");
        db.commit();
       
        out.writeObject (parent);
View Full Code Here

        Lazy1to1Parent parent = null;
       
        Database db = _category.getDatabase();
       
        db.begin();
        parent = (Lazy1to1Parent) db.load(Lazy1to1Parent.class, new Integer (1));
        assertParent (parent, 1, "parent 1");
        db.commit();
       
        out.writeObject (parent);
        out.close();
View Full Code Here

        Lazy1to1Child child = null;

        Database db = _category.getDatabase();

        db.begin();
        child = (Lazy1to1Child) db.load(Lazy1to1Child.class, new Integer (2));
        assertChild(child, 2, "child 2");
        child.setDescription ("child 22");
        db.commit();

        db.begin();
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.