Package org.apache.camel.dataformat.bindy.annotation

Examples of org.apache.camel.dataformat.bindy.annotation.DataField.precision()


            // Get pattern defined for the field
            pattern = dataField.pattern();

            // Create format object to format the field
            format = FormatFactory.getFormat(field.getType(), pattern, getLocale(), dataField.precision());

            // field object to be set
            Object modelField = model.get(field.getDeclaringClass().getName());

            // format the data received
View Full Code Here


                    // Retrieve the format, pattern and precision associated to
                    // the type
                    Class type = field.getType();
                    String pattern = datafield.pattern();
                    int precision = datafield.precision();



                    // Create format
                    Format format = FormatFactory.getFormat(type, pattern, getLocale(), precision);
View Full Code Here

            // Get pattern defined for the field
            String pattern = dataField.pattern();

            // Create format object to format the field
            format = FormatFactory.getFormat(field.getType(), pattern, getLocale(), dataField.precision());

            // field object to be set
            Object modelField = model.get(field.getDeclaringClass().getName());

            // format the data received
View Full Code Here

                    // Retrieve the format, pattern and precision associated to
                    // the type
                    Class type = field.getType();
                    String pattern = datafield.pattern();
                    int precision = datafield.precision();

                    // Create format
                    Format format = FormatFactory.getFormat(type, pattern, getLocale(), precision);

                    // Get field value
View Full Code Here

                }

                Format<?> format;
                String pattern = dataField.pattern();

                format = FormatFactory.getFormat(field.getType(), pattern, dataField.precision());
                field.set(model.get(field.getDeclaringClass().getName()), format.parse(data.get(pos)));
            }
            pos++;
        }
    }
View Full Code Here

            Field field = mapAnnotedField.get(dataField.pos());
            // Change accessibility to allow to read protected/private fields
            field.setAccessible(true);

            // Retrieve the format associated to the type
            Format format = FormatFactory.getFormat(field.getType(), dataField.pattern(), dataField.precision());
            Object obj = model.get(field.getDeclaringClass().getName());

            // Convert the content to a String and append it to the builder
            builder.append(format.format(field.get(obj)));
            if (it.hasNext()) {
View Full Code Here

                }

                Format<?> format;
                String pattern = dataField.pattern();

                format = FormatFactory.getFormat(field.getType(), pattern, dataField.precision());
                field.set(model.get(field.getDeclaringClass().getName()), format.parse(data.get(pos)));
            }
            pos++;
        }
    }
View Full Code Here

            Field field = mapAnnotedField.get(dataField.pos());
            // Change accessibility to allow to read protected/private fields
            field.setAccessible(true);

            // Retrieve the format associated to the type
            Format format = FormatFactory.getFormat(field.getType(), dataField.pattern(), dataField.precision());
            Object obj = model.get(field.getDeclaringClass().getName());

            // Convert the content to a String and append it to the builder
            builder.append(format.format(field.get(obj)));
            if (it.hasNext()) {
View Full Code Here

                    // Retrieve the format, pattern and precision associated to
                    // the type
                    Class type = field.getType();
                    String pattern = datafield.pattern();
                    int precision = datafield.precision();

                    // Create format
                    Format format = FormatFactory.getFormat(type, pattern, precision);

                    // Get field value
View Full Code Here

            // Get pattern defined for the field
            String pattern = dataField.pattern();

            // Create format object to format the field
            format = FormatFactory.getFormat(field.getType(), pattern, dataField.precision());

            // field object to be set
            Object modelField = model.get(field.getDeclaringClass().getName());

            // format the data received
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.