Package org.exolab.castor.jdo

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


        assertEquals(1, laptop.getId());
        assertEquals("laptop 1", laptop.getName());
       
        laptop.setName("laptop 1x");

        database.begin();
        database.update(laptop);
        database.commit();
       
        database.begin();
        laptop = (Laptop) database.load(Laptop.class, new Integer(1));
View Full Code Here


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

        assertEquals(1, laptop.getId());
        assertEquals("laptop 1x", laptop.getName());

        laptop.setName("laptop 1");

        database.begin();
        database.update(laptop);
        database.commit();
       
        database.begin();
        laptop = (Laptop) database.load(Laptop.class, new Integer(1));
View Full Code Here

    public void testReadOnlyOidEmpty() throws Exception {
        long start = System.currentTimeMillis();
       
        Database db = _jdo.getDatabase();
        db.getCacheManager().expireCache();
        db.begin();
       
        long begin = System.currentTimeMillis();
       
        OQLQuery query = db.getOQLQuery(
                "CALL SQL select PTF_LOCKED.ID as ID "
View Full Code Here

        database.begin();
        database.update(laptop);
        database.commit();
       
        database.begin();
        laptop = (Laptop) database.load(Laptop.class, new Integer(1));
        database.commit();

        assertNotNull(laptop);
        assertEquals("ctf.jdo.tc9x.Laptop", laptop.getClass().getName());
View Full Code Here

   
    public void testReadOnlyOidCached() throws Exception {
        long start = System.currentTimeMillis();
       
        Database db = _jdo.getDatabase();
        db.begin();
       
        long begin = System.currentTimeMillis();
       
        OQLQuery query = db.getOQLQuery(
                "CALL SQL select PTF_LOCKED.ID as ID "
View Full Code Here

    }

    public void testLoadAndUpdateLaptopRollback() 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());
View Full Code Here

        assertEquals(1, laptop.getId());
        assertEquals("laptop 1", laptop.getName());
       
        laptop.setName("laptop 1x");

        database.begin();
        database.update(laptop);
        database.commit();
       
        database.begin();
        laptop = (Laptop) database.load(Laptop.class, new Integer(1));
View Full Code Here

   
    public void testReadOnlyOidOnly() throws Exception {
        long start = System.currentTimeMillis();
       
        Database db = _jdo.getDatabase();
        db.begin();
       
        long begin = System.currentTimeMillis();
       
        OQLQuery query = db.getOQLQuery(
                "CALL SQL select PTF_LOCKED.ID as ID "
View Full Code Here

        database.begin();
        database.update(laptop);
        database.commit();
       
        database.begin();
        laptop = (Laptop) database.load(Laptop.class, new Integer(1));
        database.commit();
       
        assertNotNull(laptop);
        assertEquals("ctf.jdo.tc9x.Laptop", laptop.getClass().getName());
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.