package frame.file.office; import java.util.ArrayList; import java.util.List; import org.apache.poi.ss.format.CellFormatType; import frame.data.Entity; import frame.file.CellDataType; import frame.file.CellTypes; import frame.file.IFileload; import frame.util.Util; public class IOMappingItem implements IFileload{ private String id; private String parentId; private String fromField; private String toField; private boolean updateIgnore; private boolean insertIgnore; private CellDataType[] exportType; @Override public void initLoad(Entity entity) { // TODO Auto-generated method stub } private CellDataType[] parseExportType(String exportType) { //TODO parseExportType if (Util.isEmptyStr(exportType)) { return null; } String[] values = Util.split(exportType); List result = new ArrayList(); for (String value : values) { if (Util.isEmptyStr(value)) { continue; } CellDataType cellType = CellTypes.toExcelCellType(value); if (cellType != null) { result.add(cellType); } } return (CellDataType[]) result.toArray(); } public String getId() { return id; } public String getParentId() { return parentId; } public String getFromField() { return fromField; } public String getToField() { return toField; } public boolean isInsertIgnore() { return insertIgnore; } public boolean isUpdateIgnore() { return updateIgnore; } public CellDataType[] getExportType() { return exportType; } }