package com.mortals.xhx.common.excel.core;

import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Sheet;

import java.util.List;
import java.util.Map;

/**
 * 
* 定义需要重写的细节
* @author 神盾局
* @date 2016年8月9日 下午3:26:55
* 
* @param <T>
 */
public abstract class AbstractExcelUtil<T> implements IExcelUtil<T>{
	
	public abstract void createHeader(HSSFWorkbook wb, HSSFSheet sheet, Map<String, String> configFieldMap);

	public abstract void createHeaderFlat(HSSFWorkbook wb, HSSFSheet sheet, Map<String, String> configFieldMap);



	public abstract void createRow(HSSFWorkbook wb,Object t,HSSFSheet sheet);

	/**
	 * 填充定制化数据
	 * @param wb
	 * @param t
	 * @param sheet
	 */
	public abstract void createRowFlat(HSSFWorkbook wb,Object t,HSSFSheet sheet);



	public abstract int mergedRegio(Object t,HSSFSheet sheet,int rowStart);

	public abstract List<T> dispatch(Sheet sheet);

}
