Package org.exolab.castor.jdo

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


        truck.setKw(112);
        truck.setMake("Fiat");
        truck.setMaxWeight(3750);
        truck.setDetail((ProductDetail)
                database.load(ProductDetail.class, new Integer(11)));
        database.create(truck);
        Collection orders = new LinkedList();
        orders.add(database.load(Order.class, new Integer(11)));
        truck.setOrders(orders);
        database.commit();
       
View Full Code Here


        // create product
        database = _category.getDatabase();
        database.begin();
       
        Product pc = new Product(1, "LCD", KindEnum.MONITOR);
        database.create(pc);

        database.commit();
        database.close();

        // load created product
View Full Code Here

       
        // create some products
        database = _category.getDatabase();
        database.begin();
       
        database.create(new Product(1, "LCD", KindEnum.MONITOR));
        database.create(new Product(2, "Laser", KindEnum.PRINTER));
        database.create(new Product(3, "Desktop", KindEnum.COMPUTER));
        database.create(new Product(4, "Notebook", KindEnum.COMPUTER));

        database.commit();
View Full Code Here

        // create some products
        database = _category.getDatabase();
        database.begin();
       
        database.create(new Product(1, "LCD", KindEnum.MONITOR));
        database.create(new Product(2, "Laser", KindEnum.PRINTER));
        database.create(new Product(3, "Desktop", KindEnum.COMPUTER));
        database.create(new Product(4, "Notebook", KindEnum.COMPUTER));

        database.commit();
        database.close();
View Full Code Here

        database = _category.getDatabase();
        database.begin();
       
        database.create(new Product(1, "LCD", KindEnum.MONITOR));
        database.create(new Product(2, "Laser", KindEnum.PRINTER));
        database.create(new Product(3, "Desktop", KindEnum.COMPUTER));
        database.create(new Product(4, "Notebook", KindEnum.COMPUTER));

        database.commit();
        database.close();
View Full Code Here

        database.begin();
       
        database.create(new Product(1, "LCD", KindEnum.MONITOR));
        database.create(new Product(2, "Laser", KindEnum.PRINTER));
        database.create(new Product(3, "Desktop", KindEnum.COMPUTER));
        database.create(new Product(4, "Notebook", KindEnum.COMPUTER));

        database.commit();
        database.close();

        // query and delete all product
View Full Code Here

        Database db = null;
        MasterObject master = new MasterObject();
        master.setDescrip("This is the descrip.");
        db = _category.getDatabase();
        db.begin();
        db.create(master);
        db.commit();

        assertTrue(master.getId() != 0);

        //THIS Part Works!
View Full Code Here

        MasterObjectNoKeyGen master = new MasterObjectNoKeyGen();
        master.setId(100);
        master.setDescrip("This is the descrip.");
        db = _category.getDatabase();
        db.begin();
        db.create(master);
        db.commit();

        assertTrue(master.getId() != 0);
        assertEquals(100, master.getId());
View Full Code Here

            gPerson4.add(groupD);

            //
            // create persistent groups and persons
            //
            db.create(person1);
            db.create(person2);
            db.create(person3);
            db.create(person4);
           
            db.create(groupA);
View Full Code Here

            //
            // create persistent groups and persons
            //
            db.create(person1);
            db.create(person2);
            db.create(person3);
            db.create(person4);
           
            db.create(groupA);
            db.create(groupB);
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.