com.kangaroohy.plugin.excel.domain.SheetBuildProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of excel-spring-boot-starter Show documentation
Show all versions of excel-spring-boot-starter Show documentation
easy and high performance excel
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 extends HeadGenerator> 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);
}
}