package frame.file;
|
|
import org.apache.poi.ss.format.CellFormatType;
|
|
import frame.data.Entity;
|
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 CellFormatType[] exportType;
|
|
@Override
|
public void initLoad(Entity entity) {
|
// TODO Auto-generated method stub
|
|
}
|
private CellFormatType[] parseExportType(String exportType) {
|
if (Util.isEmptyStr(exportType)) {
|
return null;
|
}
|
|
String[] values = Utils.split(exportType);
|
List<CellDataType> result = new List<CellDataType>();
|
|
foreach (String value in values) {
|
if (string.IsNullOrWhiteSpace(value)) {
|
continue;
|
}
|
|
CellDataType? cellType = CellTypes.toExcelCellType(value);
|
|
if (cellType != null) {
|
result.Add(cellType.Value);
|
}
|
}
|
|
return 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;
|
}
|
//TODO CellFormatType
|
public CellFormatType[] getExportType() {
|
return exportType;
|
}
|
|
}
|