Package org.thymeleaf.itutorial.beans

Examples of org.thymeleaf.itutorial.beans.Product


    private static final String NO_WEBSITE = null;
   
    public static Product loadProduct() {
        try {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            return new Product("Wooden wardrobe with glass doors", Integer.valueOf(850), sdf.parse("2013-02-18"));
        } catch (ParseException ex) {
            throw new RuntimeException("Invalid date");
        }
    }
View Full Code Here


   
    public static List<Product> loadAllProducts() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        List<Product> products = new ArrayList<Product>();
        try {
            products.add(new Product("Chair", Integer.valueOf(25), sdf.parse("2013-02-18")));
            products.add(new Product("Table", Integer.valueOf(150), sdf.parse("2013-02-15")));
            products.add(new Product("Armchair", Integer.valueOf(85), sdf.parse("2013-02-20")));
            products.add(new Product("Wardrobe", Integer.valueOf(450), sdf.parse("2013-02-21")));
            products.add(new Product("Kitchen table", Integer.valueOf(49), sdf.parse("2013-02-15")));
            products.add(new Product("Bookcase", Integer.valueOf(80), sdf.parse("2013-02-17")));
        } catch (ParseException ex) {
            throw new RuntimeException("Invalid date");
        }
        return products;
    }
View Full Code Here

TOP

Related Classes of org.thymeleaf.itutorial.beans.Product

Copyright © 2018 www.massapicom. 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.