// Path: src/main/java/com/ebay/xcelite/annotate/NoConverterClass.java
// public final class NoConverterClass implements ColumnValueConverter<Object, Object> {
// 
//   @Override
//   public Object serialize(Object value) {
//     return value;
//   }
// 
//   @Override
//   public Object deserialize(Object value) {
//     return value;
//   }
// }
// 
// Path: src/main/java/com/ebay/xcelite/exceptions/XceliteException.java
// public class XceliteException extends RuntimeException {
// 
//   private static final long serialVersionUID = 1L;
// 
//   public XceliteException(String message) {
//     super(message);
//   }
// 
//   public XceliteException(Exception exception) {
//     super(exception);
//   }
// 
//   public XceliteException(String message, Exception exception) {
//     super(message, exception);
//   }
// }


import com.google.common.collect.Sets;
import static org.reflections.ReflectionUtils.withAnnotation;
import java.lang.reflect.Field;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import org.reflections.ReflectionUtils;
import com.ebay.xcelite.annotate.NoConverterClass;
import com.ebay.xcelite.annotations.AnyColumn;
import com.ebay.xcelite.annotations.Column;
import com.ebay.xcelite.annotations.Row;
import com.ebay.xcelite.exceptions.XceliteException;
import com.google.common.collect.Maps;


  private void columnsOrdering() {
    Row rowAnnotation = type.getAnnotation(Row.class);
    if (rowAnnotation == null || rowAnnotation.colsOrder() == null || rowAnnotation.colsOrder().length == 0) return;
    colsOrdering = Sets.newLinkedHashSet();
    for (String column : rowAnnotation.colsOrder()) {
      colsOrdering.add(new Col(column));
    }
  }

  @SuppressWarnings("unchecked")
  public void extract() {    
    Set<Field> columnFields = ReflectionUtils.getAllFields(type, withAnnotation(Column.class));
    for (Field columnField : columnFields) {
      Column annotation = columnField.getAnnotation(Column.class);
      Col col = null;
      if (annotation.name().isEmpty()) {
        col = new Col(columnField.getName(), columnField.getName());        
      } else {
        col = new Col(annotation.name(), columnField.getName());        
      }      
      
      if (annotation.ignoreType()) {
        col.setType(String.class);
      } else {
        col.setType(columnField.getType());
      }
      if (!annotation.dataFormat().isEmpty()) {
        col.setDataFormat(annotation.dataFormat());
      }

// Path: src/main/java/com/ebay/xcelite/annotate/NoConverterClass.java
// public final class NoConverterClass implements ColumnValueConverter<Object, Object> {
// 
//   @Override
//   public Object serialize(Object value) {
//     return value;
//   }
// 
//   @Override
//   public Object deserialize(Object value) {
//     return value;
//   }
// }
// 
// Path: src/main/java/com/ebay/xcelite/exceptions/XceliteException.java
// public class XceliteException extends RuntimeException {
// 
//   private static final long serialVersionUID = 1L;
// 
//   public XceliteException(String message) {
//     super(message);
//   }
// 
//   public XceliteException(Exception exception) {
//     super(exception);
//   }
// 
//   public XceliteException(String message, Exception exception) {
//     super(message, exception);
//   }
// }


// Path: src/main/java/com/ebay/xcelite/column/ColumnsExtractor.java
import com.google.common.collect.Sets;
import static org.reflections.ReflectionUtils.withAnnotation;
import java.lang.reflect.Field;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import org.reflections.ReflectionUtils;
import com.ebay.xcelite.annotate.NoConverterClass;
import com.ebay.xcelite.annotations.AnyColumn;
import com.ebay.xcelite.annotations.Column;
import com.ebay.xcelite.annotations.Row;
import com.ebay.xcelite.exceptions.XceliteException;
import com.google.common.collect.Maps;


  private void columnsOrdering() {
    Row rowAnnotation = type.getAnnotation(Row.class);
    if (rowAnnotation == null || rowAnnotation.colsOrder() == null || rowAnnotation.colsOrder().length == 0) return;
    colsOrdering = Sets.newLinkedHashSet();
    for (String column : rowAnnotation.colsOrder()) {
      colsOrdering.add(new Col(column));
    }
  }

  @SuppressWarnings("unchecked")
  public void extract() {    
    Set<Field> columnFields = ReflectionUtils.getAllFields(type, withAnnotation(Column.class));
    for (Field columnField : columnFields) {
      Column annotation = columnField.getAnnotation(Column.class);
      Col col = null;
      if (annotation.name().isEmpty()) {
        col = new Col(columnField.getName(), columnField.getName());        
      } else {
        col = new Col(annotation.name(), columnField.getName());        
      }      
      
      if (annotation.ignoreType()) {
        col.setType(String.class);
      } else {
        col.setType(columnField.getType());
      }
      if (!annotation.dataFormat().isEmpty()) {
        col.setDataFormat(annotation.dataFormat());
      }

      if (annotation.converter() != NoConverterClass.class) {
