Package com.ebay.xcelite.column

Examples of com.ebay.xcelite.column.Col


        T object = type.newInstance();
       
        int i = 0;
        for (String columnName : header) {
          Cell cell = row.getCell(i, Row.RETURN_BLANK_AS_NULL);
          Col col = mapper.getColumn(columnName);
          if (col == null) {           
            if (anyColumn != null) {
              Set<Field> fields = ReflectionUtils.getAllFields(object.getClass(), withName(anyColumn.getFieldName()));
              Field field = fields.iterator().next();
              if (!isColumnInIgnoreList(field, columnName)) {
                writeToAnyColumnField(field, object, cell, columnName);
              }
            }          
          } else {
            Set<Field> fields = ReflectionUtils.getAllFields(object.getClass(), withName(col.getFieldName()));
            Field field = fields.iterator().next();
            writeToField(field, object, cell, col);
          }
          i++;
        }
View Full Code Here


      Set<Field> fields = ReflectionUtils.getAllFields(t.getClass(), withName(anyColumn.getFieldName()));
      Field anyColumnField = fields.iterator().next();
      anyColumnField.setAccessible(true);
      Map<String, Object> fieldValueObj = (Map<String, Object>) anyColumnField.get(t);
      for (Map.Entry<String, Object> entry : fieldValueObj.entrySet()) {
        Col column = new Col(entry.getKey(), anyColumnField.getName());
        column.setType(entry.getValue() == null ? String.class : entry.getValue().getClass());
        column.setAnyColumn(true);
        if (anyColumn.getConverter() != NoConverterClass.class) {
          column.setConverter(anyColumn.getConverter());
        }
        columnToAdd.add(column);
      }
    } catch (SecurityException e) {
      throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of com.ebay.xcelite.column.Col

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.