package ${basePackage}.frame.excel;


import ${basePackage}.frame.excel.converter.Converter;

import java.io.Serializable;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

/**
 * WColumn - Excel列对象(包含列名，长度，必须项，列描述，指定转换器)
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2017-01-01
 */
public class WColumn implements Serializable {
    /**
     * 列名
     */
    private String name = "";
    /**
     * 列宽度
     */
    private int cellWidth = 8;
    /**
     * 是否是必输列
     */
    private boolean isRequired = false;
    /**
     * 该列的描述字段
     */
    private String description = "";
    /**
     * 列转换器
     */
    private Converter converter;
    /**
     * Field对象
     */
    private Field field;
    /**
     * set方法
     */
    private Method setMethod;
    /**
     * get方法
     */
    private Method getMethod;
    /**
     * ExcelType
     */
    private int cellType = 1;
    /**
     * 下拉列表
     */
    private String[] cellList;

    public WColumn() {
        this.name = "";
    }

    public WColumn(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Field getField() {
        return field;
    }

    public void setField(Field field) {
        this.field = field;
    }

    public int getCellWidth() {
        return cellWidth;
    }

    public void setCellWidth(int cellWidth) {
        this.cellWidth = cellWidth;
    }

    public boolean isRequired() {
        return isRequired;
    }

    public void setRequired(boolean isRequired) {
        this.isRequired = isRequired;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Converter getConverter() {
        return converter;
    }

    public void setConverter(Converter converter) {
        this.converter = converter;
    }

    public int getCellType() {
        return cellType;
    }

    public void setCellType(int cellType) {
        this.cellType = cellType;
    }

    public Method getSetMethod() {
        return setMethod;
    }

    public void setSetMethod(Method setMethod) {
        this.setMethod = setMethod;
    }

    public Method getGetMethod() {
        return getMethod;
    }

    public void setGetMethod(Method getMethod) {
        this.getMethod = getMethod;
    }

    public String[] getCellList() {
        return cellList;
    }

    public void setCellList(String[] cellList) {
        this.cellList = cellList;
    }
}
