Examples of CSVField


Examples of com.google.api.ads.adwords.awreporting.model.csv.annotation.CsvField

   */
  private void addNameMappingIfAnnotationPresent(Map<String, String> nameMapping, Field field) {

    if (field.isAnnotationPresent(CsvField.class)) {

      CsvField reportFieldAnnotation = field.getAnnotation(CsvField.class);
      String csvFieldName = reportFieldAnnotation.value();
      nameMapping.put(csvFieldName, field.getName());
    }
  }
View Full Code Here

Examples of com.google.api.ads.adwords.awreporting.model.csv.annotation.CsvField

   */
  private void addPropertyNameIfAnnotationPresent(
      List<String> propertiesToSelect, Field field, Set<String> propertyExclusions) {

    if (field.isAnnotationPresent(CsvField.class)) {
      CsvField reportFieldAnnotation = field.getAnnotation(CsvField.class);
      String reportPropertyName = reportFieldAnnotation.reportField();

      if (!propertyExclusions.contains(reportPropertyName)) {
        propertiesToSelect.add(reportPropertyName);
      }
    }
View Full Code Here

Examples of org.apache.commons.csv.writer.CSVField

        for (Object value : set) {
            if (value != null) {
                String text = exchange.getContext().getTypeConverter().convertTo(String.class, value);
                // do not add field twice
                if (config.getField(text) == null) {
                    CSVField field = new CSVField(text);
                    config.addField(field);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.commons.csv.writer.CSVField

        for (Object value : set) {
            if (value != null) {
                String text = exchange.getContext().getTypeConverter().convertTo(String.class, value);
                // do not add field twice
                if (config.getField(text) == null) {
                    CSVField field = new CSVField(text);
                    config.addField(field);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.commons.csv.writer.CSVField

            // lets add fields
            Set set = map.keySet();
            for (Object value : set) {
                if (value != null) {
                    String text = value.toString();
                    CSVField field = new CSVField(text);
                    conf.addField(field);
                }
            }
            CSVWriter writer = new CSVWriter(conf);
            writer.setWriter(out);
View Full Code Here

Examples of org.apache.commons.csv.writer.CSVField

        for (Object value : set) {
            if (value != null) {
                String text = exchange.getContext().getTypeConverter().convertTo(String.class, value);
                // do not add field twice
                if (config.getField(text) == null) {
                    CSVField field = new CSVField(text);
                    config.addField(field);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.commons.csv.writer.CSVField

            // lets add fields
            Set set = map.keySet();
            for (Object value : set) {
                if (value != null) {
                    String text = value.toString();
                    CSVField field = new CSVField(text);
                    conf.addField(field);
                }
            }
            CSVWriter writer = new CSVWriter(conf);
            writer.setWriter(out);
View Full Code Here

Examples of org.apache.commons.csv.writer.CSVField

                    to("mock:resultMulti");

                CsvDataFormat customCsv = new CsvDataFormat();
                CSVConfig custom = new CSVConfig();
                custom.setDelimiter(';');
                custom.addField(new CSVField("foo"));
                custom.addField(new CSVField("baz"));
                custom.addField(new CSVField("bar"));
                customCsv.setConfig(custom);
                customCsv.setAutogenColumns(false);

                from("direct:startMultiCustom").
                    marshal(customCsv).
View Full Code Here

Examples of org.apache.commons.csv.writer.CSVField

        for (Object value : set) {
            if (value != null) {
                String text = exchange.getContext().getTypeConverter().convertTo(String.class, value);
                // do not add field twice
                if (config.getField(text) == null) {
                    CSVField field = new CSVField(text);
                    config.addField(field);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.commons.csv.writer.CSVField

                    to("mock:resultMulti");

                CsvDataFormat customCsv = new CsvDataFormat();
                CSVConfig custom = new CSVConfig();
                custom.setDelimiter(';');
                custom.addField(new CSVField("foo"));
                custom.addField(new CSVField("baz"));
                custom.addField(new CSVField("bar"));
                customCsv.setConfig(custom);
                customCsv.setAutogenColumns(false);

                from("direct:startMultiCustom").
                    marshal(customCsv).
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.