Package org.exolab.castor.jdo

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


            equip.setReason(reason);
            equip.setCount(new Integer(count));
            equip.setCreated(date, "user");
            equip.setUpdated(date, "user");
           
            db.create(equip);
           
            countType = (countType < TYPE_MAX) ? (countType + 1) : 1;
            countSupplier = (countSupplier < SUPPLIER_MAX) ? (countSupplier + 1) : 1;
            countState = (countState < STATE_MAX) ? (countState + 1) : 1;
            countReason = (countReason < REASON_MAX) ? (countReason + 1) : 1;
View Full Code Here


            service.setFlag3((count % 3) == 0);
            service.setFlag4((count % 3) == 1);
            service.setCreated(date, "user");
            service.setUpdated(date, "user");
           
            db.create(service);
           
            countEquip = (countEquip < EQUIPMENT_MAX) ? (countEquip + 1) : 1;
            count++;
        }
       
View Full Code Here

        entityTwo.setName("entity1.200");
        AutostoreMain entityOne = new AutostoreMain();
        entityOne.setId(new Integer(200));
        entityOne.setName("entity2.200");
        entityOne.setAssociatedOne(entityTwo);
        db.create(entityOne);
        db.commit();
       
        db.begin();
        entityOne = (AutostoreMain) db.load(AutostoreMain.class, new Integer(200));
        assertNotNull(entityOne);
View Full Code Here

        assocOne.setName("entity2.300");
        AutostoreMain main = new AutostoreMain();
        main.setId(new Integer(300));
        main.setName("entity1.300");
        main.setAssociatedOne(assocOne);
        db.create(main);
        db.commit();
       
        db.begin();
        main = (AutostoreMain) db.load(AutostoreMain.class, new Integer(300));
        assertNotNull(main);
View Full Code Here

        assocOne.setName("entity2.300");
        AutostoreMain main = new AutostoreMain();
        main.setId(new Integer(300));
        main.setName("entity1.300");
        main.setAssociatedOne(assocOne);
        db.create(main);
        db.commit();
       
        db.begin();
        main = (AutostoreMain) db.load(AutostoreMain.class, new Integer(300));
        assertNotNull(main);
View Full Code Here

        insertEntity.setId(new Integer(100));
        insertEntity.setName("entity 100");
        insertEntity.setStartDate(date);
        insertEntity.setStartTime(null);
        insertEntity.setStartTimestamp(null);
        database.create(insertEntity);
        database.commit();

        Integer id = insertEntity.getId();
       
        /*
 
View Full Code Here

        insertEntity.setId(new Integer(100));
        insertEntity.setName("entity 100");
        insertEntity.setStartDate(null);
        insertEntity.setStartTime(date);
        insertEntity.setStartTimestamp(null);
        database.create(insertEntity);
        database.commit();

        Integer id = insertEntity.getId();
       
        /*
 
View Full Code Here

        insertEntity.setId(new Integer(100));
        insertEntity.setName("entity 100");
        insertEntity.setStartDate(null);
        insertEntity.setStartTime(null);
        insertEntity.setStartTimestamp(date);
        database.create(insertEntity);
        database.commit();

        Integer id = insertEntity.getId();
       
        /*
 
View Full Code Here

        greatGrandChild.setId(new Integer(8));
        greatGrandChild.setName("Test Greatgrandchild");
        grandChild.addChild(greatGrandChild);
       
        db.begin();
        db.create(folder);
        db.create(child);
        db.create(grandChild);
        db.create(greatGrandChild);
        db.commit();
View Full Code Here

        greatGrandChild.setName("Test Greatgrandchild");
        grandChild.addChild(greatGrandChild);
       
        db.begin();
        db.create(folder);
        db.create(child);
        db.create(grandChild);
        db.create(greatGrandChild);
        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.