Package org.exolab.castor.jdo

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


       
        BeanObject object = new BeanObject();
        object.setField1("Test Field 1.");
        object.setField2("Test Field 2.");
        db.begin();
        db.create(object);
        db.commit();
    }
}
View Full Code Here


        // Timestamp should have been initialized to 0 by constructor
        long beginTimestamp = entity.jdoGetTimeStamp();
        LOG.debug("Timestamp after begin: " + beginTimestamp);
        assertEquals(TimeStampableEntity.DEFAULT_TIMESTAMP, beginTimestamp);
       
        db.create(entity);
       
        // Timestamp should have been changed at create.
        long createTimestamp = entity.jdoGetTimeStamp();
        LOG.debug("Timestamp after create: " + createTimestamp);
        assertTrue(beginTimestamp != createTimestamp);
View Full Code Here

       
        //Country and states of BRAZIL
        country = new Country();
        country.setOid("AAAACTBR");
        country.setName("BRAZIL");
        db.create(country);
       
        state = new State();
        state.setOid("AASTBRPR");
        state.setName("PARANA");
        state.setCountry(country);
View Full Code Here

       
        state = new State();
        state.setOid("AASTBRPR");
        state.setName("PARANA");
        state.setCountry(country);
        db.create(state);
       
        state = new State();
        state.setOid("AASTBRSP");
        state.setName("SAO PAULO");
        state.setCountry(country);
View Full Code Here

       
        state = new State();
        state.setOid("AASTBRSP");
        state.setName("SAO PAULO");
        state.setCountry(country);
        db.create(state);
       
        //Country and states of UNITED STATES
        country = new Country();
        country.setOid("AAAACTUS");
        country.setName("UNITED STATES");
View Full Code Here

       
        //Country and states of UNITED STATES
        country = new Country();
        country.setOid("AAAACTUS");
        country.setName("UNITED STATES");
        db.create(country);
       
        state = new State();
        state.setOid("AASTUSTX");
        state.setName("TEXAS");
        state.setCountry(country);
View Full Code Here

       
        state = new State();
        state.setOid("AASTUSTX");
        state.setName("TEXAS");
        state.setCountry(country);
        db.create(state);
       
        state = new State();
        state.setOid("AASTUSCL");
        state.setName("COLORADO");
        state.setCountry(country);
View Full Code Here

       
        state = new State();
        state.setOid("AASTUSCL");
        state.setName("COLORADO");
        state.setCountry(country);
        db.create(state);
       
        //Country for test
        country = new Country();
        country.setOid("AAAACTTS");
        country.setName("COUNTRY FOR TEST");
View Full Code Here

       
        //Country for test
        country = new Country();
        country.setOid("AAAACTTS");
        country.setName("COUNTRY FOR TEST");
        db.create(country);
       
        db.commit();
        db.close();
    }
   
View Full Code Here

        Address addr = new Address();
        addr.setId(999);
        emp.setAddress(addr);
        assertEquals(999,emp.getAddress().getId());
        //TODO does the address have to exist in the db for creating an emp?
        db.create(addr);
        db.create(emp);
        assertNotNull(db.load(Employee.class, new Long(666)));
       
        db.commit();
//        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.