Examples of newBean()


Examples of org.milyn.javabean.Bean.newBean()

                    .bindTo(orderBean.newBean(OrderItem.class, "order-item")
                        .bindTo("productId", "order-item/product")
                        .bindTo("quantity", "order-item/quantity")
                        .bindTo("price", "order-item/price"))
            ).bindTo("orderItems",
                orderBean.newBean(OrderItem[].class, "/order")
                    .bindTo(orderBean.newBean(OrderItem.class, "order-item")
                        .bindTo("productId", "order-item/product")
                        .bindTo("quantity", "order-item/quantity")
                        .bindTo("price", "order-item/price")));
View Full Code Here

Examples of org.milyn.javabean.Bean.newBean()

                        .bindTo("productId", "order-item/product")
                        .bindTo("quantity", "order-item/quantity")
                        .bindTo("price", "order-item/price"))
            ).bindTo("orderItems",
                orderBean.newBean(OrderItem[].class, "/order")
                    .bindTo(orderBean.newBean(OrderItem.class, "order-item")
                        .bindTo("productId", "order-item/product")
                        .bindTo("quantity", "order-item/quantity")
                        .bindTo("price", "order-item/price")));

        smooks.addVisitor(orderBean);
View Full Code Here

Examples of org.milyn.javabean.Bean.newBean()

        smooks.addVisitor(orderBean);

        try {
            // invalid attempt to bindTo after it has been added to the Smooks instance...
            orderBean.bindTo("header",
                orderBean.newBean(Header.class, "/order")
                    .bindTo("privatePerson", "header/privatePerson"));

            fail("Expected IllegalStateException");
        } catch(IllegalStateException e) {
            assertEquals("Unexpected attempt to bindTo Bean instance after the Bean instance has been added to a Smooks instance.", e.getMessage());
View Full Code Here

Examples of org.milyn.javabean.Bean.newBean()

            if (bindingType == BindingType.LIST) {
                Bean listBean = new Bean(ArrayList.class, bindBeanId,
                        SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR);

                bean = listBean.newBean(bindBeanClass, recordElementName);
                listBean.bindTo(bean);
                addFieldBindings(bean);

                listBean.addVisitors(visitorMap);
            } else if (bindingType == BindingType.MAP) {
View Full Code Here

Examples of org.milyn.javabean.Bean.newBean()

        Smooks smooks = new Smooks();

        Bean orderBean = new Bean(HashMap.class, "order", "/order");

        orderBean.bindTo("header",
                orderBean.newBean(HashMap.class, "/order")
                    .bindTo("customerNumber", "header/customer/@number", new IntegerDecoder())
                    .bindTo("customerName", "header/customer")
                    .bindTo("privatePerson", "header/privatePerson")
                ).bindTo("orderItems",
                orderBean.newBean(ArrayList.class, "/order")
View Full Code Here

Examples of org.milyn.javabean.Bean.newBean()

                orderBean.newBean(HashMap.class, "/order")
                    .bindTo("customerNumber", "header/customer/@number", new IntegerDecoder())
                    .bindTo("customerName", "header/customer")
                    .bindTo("privatePerson", "header/privatePerson")
                ).bindTo("orderItems",
                orderBean.newBean(ArrayList.class, "/order")
                        .bindTo(orderBean.newBean(HashMap.class, "order-item")
                            .bindTo("productId", "order-item/product")
                            .bindTo("quantity", "order-item/quantity")
                            .bindTo("price", "order-item/price", new DoubleDecoder()))
                );
View Full Code Here

Examples of org.milyn.javabean.Bean.newBean()

                    .bindTo("customerNumber", "header/customer/@number", new IntegerDecoder())
                    .bindTo("customerName", "header/customer")
                    .bindTo("privatePerson", "header/privatePerson")
                ).bindTo("orderItems",
                orderBean.newBean(ArrayList.class, "/order")
                        .bindTo(orderBean.newBean(HashMap.class, "order-item")
                            .bindTo("productId", "order-item/product")
                            .bindTo("quantity", "order-item/quantity")
                            .bindTo("price", "order-item/price", new DoubleDecoder()))
                );
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.