All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kangaroohy.plugin.excel.domain.SheetBuildProperties Maven / Gradle / Ivy

There is a newer version: 3.1.3
Show newest version
package com.kangaroohy.plugin.excel.domain;

import com.kangaroohy.plugin.excel.annotation.Sheet;
import com.kangaroohy.plugin.excel.head.HeadGenerator;
import lombok.Data;

/**
 * Sheet Build Properties
 *
 * @author hy
 */
@Data
public class SheetBuildProperties {

	/**
	 * sheet 编号
	 */
	private int sheetNo = -1;

	/**
	 * sheet name
	 */
	private String sheetName;

	/**
	 * 包含字段
	 */
	private String[] includes = new String[0];

	/**
	 * 排除字段
	 */
	private String[] excludes = new String[0];

	/**
	 * 头生成器
	 */
	private Class headGenerateClass = HeadGenerator.class;

	public SheetBuildProperties(Sheet sheetAnnotation) {
		this.sheetNo = sheetAnnotation.sheetNo();
		this.sheetName = sheetAnnotation.sheetName();
		this.includes = sheetAnnotation.includes();
		this.excludes = sheetAnnotation.excludes();
		this.headGenerateClass = sheetAnnotation.headGenerateClass();
	}

	public SheetBuildProperties(int index) {
		this.sheetNo = index;
		this.sheetName = "sheet" + (sheetNo + 1);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy