Package wwutil.jsoda

Examples of wwutil.jsoda.Jsoda.dao()


        // Create the corresponding table in the database.  Only need to do this once.
        jsoda.createModelTable(SampleUser.class);

        // Get the Dao object specific to the SampleUser model class.
        Dao<SampleUser> dao = jsoda.dao(SampleUser.class);

        // Save some objects
        dao.put(new SampleUser(101, "Jack", 1));
        dao.put(new SampleUser(102, "Jill", 1));
        dao.put(new SampleUser(103, "Joe", 1));
View Full Code Here


        // Create the table corresponding to the model class.  Only need to do this once.
        jsoda.createModelTable(SampleProduct.class);


        // Save some objects
        Dao<SampleProduct>      dao = jsoda.dao(SampleProduct.class);
        dao.put(new SampleProduct("item1", "Red Shirt", "Premium red shirt", 29.95f));
        dao.put(new SampleProduct("item2", "Tophat", "Tophat for the cat", 90f));
        dao.put(new SampleProduct("item3", "Socks", null, 2.95f));
        dao.put(new SampleProduct("item4", "Steak", "Sizzling steak", 12.95f));
        dao.put(new SampleProduct("item5", null, "product with null name", 0.0f));
View Full Code Here

        // Create the table corresponding to the model class.  Only need to do this once.
        jsoda.createModelTable(SampleProduct2.class);


        // Save some objects
        Dao<SampleProduct2>      dao = jsoda.dao(SampleProduct2.class);
        dao.put(new SampleProduct2("item1", "Red Shirt", "Premium red shirt", "(415) 555-1212", "800-123-4567", 29.95f));
        dao.put(new SampleProduct2("item2", "Tophat", "Tophat for the cat", "(415) 555-1212", "800-789-ABCD", 90f));
        dao.put(new SampleProduct2("item3", "Socks", null, "(415) 555-1212", "800-555-1212", 2.95f));
        dao.put(new SampleProduct2("item4", "Steak", "Sizzling steak", "(415) 555-1212", "800-555-ab$d", 12.95f));
        dao.put(new SampleProduct2("item5", "Tophat", "product with null name", "(415) 555-1212", "800-123-4567", 0.0f));
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.