package frame.file;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
|
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 CellDataType[] exportType;
|
|
@Override
|
public void initLoad(Entity entity) {
|
// TODO Auto-generated method stub
|
|
}
|
//TODO parseExportType
|
private CellDataType[] parseExportType(String exportType) {
|
if (Util.isEmptyStr(exportType)) {
|
return null;
|
}
|
|
String[] values = Utils.split(exportType);
|
List<CellDataType> result = new ArrayList<CellDataType>();
|
|
for (String value : values) {
|
if (Util.isEmptyStr(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;
|
}
|
public boolean isUpdateIgnore() {
|
return updateIgnore;
|
}
|
|
public CellDataType[] getExportType() {
|
return exportType;
|
}
|
|
}
|