Package org.exolab.castor.jdo

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


        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


       
        db.begin();
        db.create(folder);
        db.create(child);
        db.create(grandChild);
        db.create(greatGrandChild);
        db.commit();

        db.close();
    }
   
View Full Code Here

        if ( ! results.hasMore() )
        {
            group = new ProductGroup();
            group.setId( 3 );
            group.setName( "a group" );
            db.create( group );
            LOG.debug( "Creating new group: " + group );
        }
        else
        {
            group = ( ProductGroup ) results.next();
View Full Code Here

            detail = new ProductDetail();
            detail.setId( 3 );
            detail.setName( "monitor" );
            product.addDetail( detail );
            LOG.debug( "Creating new product: " + product );
            db.create( product );
        }
        else
        {
            LOG.debug( "Query result: " + results.next() );
        }
View Full Code Here

            detail = new ProductDetail();
            detail.setId( 5 );
            detail.setName( "scsi card" );
            computer.addDetail( detail );
            LOG.debug( "Creating new computer: " + computer );
            db.create( computer );
        } else {
            LOG.debug( "Query result: " + results.next() );
        }
        LOG.info( "End transaction: one-to-one, one-to-many and dependent relations" );
        db.commit();
View Full Code Here

                detail = new ProductDetail();
                detail.setId( j );
                detail.setName( "detail" + detail.getId() );
                product.addDetail( detail );
                LOG.debug( "Creating new product: " + product );
                db.create( product );
            }
            else
            {
                LOG.debug( "Query result: " + results.next() );
            }
View Full Code Here

            {
                category = new Category();
                category.setId( x );
                category.setName( "category" + category.getId() );
                category.addProduct( product );
                db.create( category );
                LOG.debug( "Creating new category: " + category );
            }
            else
            {
                category = ( Category ) results.next();
View Full Code Here

        db.begin();
       
        Product1893 pd1 = new Product1893();
        pd1.setName("Product-1");
        pd1.setDescription("Product-1: <30");
        db.create(pd1);
       
        Product1893 pd2 = new Product1893();
        pd2.setName("Product-2");
        pd2.setDescription("Product-2: <30");
        db.create(pd2);
View Full Code Here

        db.create(pd1);
       
        Product1893 pd2 = new Product1893();
        pd2.setName("Product-2");
        pd2.setDescription("Product-2: <30");
        db.create(pd2);
       
        db.commit();
        db.close();
    }
View Full Code Here

        db.begin();
       
        Craft crf1 = new Craft();
        crf1.setName("Craft-1");
        crf1.setDescription("Craft-1: <30");
        db.create(crf1);
       
        Craft crf2 = new Craft();
        crf2.setName("Craft-2");
        crf2.setDescription("Craft-2: <30");
        db.create(crf2);
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.