Package org.exolab.castor.jdo

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


            count++;
        }
       
        long iterate = System.currentTimeMillis();
       
        db.commit();
       
        long commit = System.currentTimeMillis();
       
        db.close();
View Full Code Here


            count++;
        }
       
        long iterate = System.currentTimeMillis();
       
        db.commit();
       
        long commit = System.currentTimeMillis();
       
        db.close();
View Full Code Here

                        firstObject = false;
                    }
                    _model.addRow(fillRow(properties, o));

                }
                db.commit();

                _resultTable.setModel(_model);
                _resultTable.repaint();
                _tabbedPane.setSelectedComponent(_resultScrollpane);
View Full Code Here

        Entity entity = (Entity) results.next();

        assertNotNull(entity);
        assertEquals(new Integer(1), entity.getId());
       
        db.commit();
        db.close();
    }
}
View Full Code Here

    public void testLoadLaptop() throws Exception {
        Database database = _category.getDatabase();
       
        database.begin();
        Laptop laptop = (Laptop) database.load(Laptop.class, new Integer(1));
        database.commit();
       
        assertNotNull(laptop);
        assertEquals("ctf.jdo.tc9x.Laptop", laptop.getClass().getName());
        assertEquals(1, laptop.getId());
        assertEquals("laptop 1", laptop.getName());
View Full Code Here

        ProductDetail detail = new ProductDetail();
        detail.setId(10);
        detail.setCategory("category 10");
        detail.setLocation("location 10");
        database.create(detail);
        database.commit();
       
       
        database.begin();
        Laptop laptop = new Laptop();
        laptop.setId(10);
View Full Code Here

        Owner owner = new Owner ();
        owner.setId(new Integer (10));
        owner.setName("owner 10");
        owner.setProduct(laptop);
        database.commit();
       
        database.begin();
        laptop = (Laptop) database.load (Laptop.class, new Integer(10));
        database.commit();
       
View Full Code Here

        owner.setProduct(laptop);
        database.commit();
       
        database.begin();
        laptop = (Laptop) database.load (Laptop.class, new Integer(10));
        database.commit();
       
        assertNotNull (laptop);
        assertEquals("ctf.jdo.tc9x.Laptop", laptop.getClass().getName());
        assertEquals(10, laptop.getId());
        assertEquals("laptop 10", laptop.getName());
View Full Code Here

        assertEquals("laptop 10", laptop.getName());
       
        database.begin();
        database.remove(database.load(Laptop.class, new Integer(10)));
        database.remove(database.load(ProductDetail.class, new Integer(10)));
        database.commit();
       
        database.begin();
        try {
            laptop = (Laptop) database.load(Laptop.class, new Integer(10));
            fail("Laptop with id 10 still exists.");
View Full Code Here

            count++;
        }
       
        long iterate = System.currentTimeMillis();
       
        db.commit();
       
        long commit = System.currentTimeMillis();
       
        db.close();
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.