Package org.exolab.castor.jdo

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


            fail("Laptop with id 10 still exists.");
        } catch (ObjectNotFoundException e) {
           assertEquals("The object of type ctf.jdo.tc9x.Laptop with identity <10(10)> "
                   + "was not found in persistent storage", e.getMessage());
        }
        database.commit();
       
        database.close();
    }

    public void testLoadLaptopMulti() throws Exception {
View Full Code Here


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

        Database database = _category.getDatabase();
       
        database.begin();
        LaptopMulti laptop = (LaptopMulti) database.load(LaptopMulti.class,
                new Identity(new Integer (1), new Integer(1)));
        database.commit();
       
        assertNotNull(laptop);
        assertEquals("ctf.jdo.tc9x.LaptopMulti", laptop.getClass().getName());
        assertEquals("laptop 1", laptop.getName());
        assertEquals(1, laptop.getId1());
View Full Code Here

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

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

        Database database = _category.getDatabase();
       
        database.begin();
        ServerMulti server = (ServerMulti) database.load(ServerMulti.class,
                new Identity(new Integer(3), new Integer(3)));
        database.commit();
       
        assertNotNull(server);
        assertEquals("ctf.jdo.tc9x.ServerMulti", server.getClass().getName());
        assertEquals(3, server.getId1());
        assertEquals(3, server.getId2());
View Full Code Here

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

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

        database.begin();
        Order order = new Order();
        order.setId(12);
        order.setName("order 12");
        database.create(order);
        database.commit();

        database.begin();
        ProductDetail detail = new ProductDetail();
        detail.setId(12);
        detail.setCategory("category 12");
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.