| | |
| | | import frame.data.Entity; |
| | | import frame.data.meta.EntityMeta; |
| | | import frame.expression.VariantContext; |
| | | import frame.file.office.FileIOTypeCode; |
| | | import frame.file.office.IOMapping; |
| | | import frame.file.office.IOMappingItemRuntime; |
| | | import frame.file.office.IOMappingRuntime; |
| | |
| | | |
| | | public class FileIOItem extends IOProcessor implements IFileload{ |
| | | |
| | | public static String TypeCode_Import = "import"; |
| | | public static String TypeCode_DB = "db"; |
| | | public static String TypeCode_Output = "output"; |
| | | |
| | | private String id; |
| | | private String fromName; |
| | | private String toName; |
| | | private String typeCode; |
| | | private FileIOTypeCode typeCode; |
| | | private String mappingId; |
| | | private boolean distinctSelect; |
| | | private boolean standardMove; |
| | |
| | | private Direction direction; |
| | | private int fromRowNo; |
| | | private int toRowNo; |
| | | private int loglevel; |
| | | |
| | | private EntityMeta fromMeta; |
| | | private EntityMeta toMeta; |
| | |
| | | public void initLoad(Entity entity) { |
| | | //TODO load |
| | | } |
| | | |
| | | public static String extractSheetName(String value) { |
| | | if (Util.isEmptyStr(value)) { |
| | | return "Sheet1"; |
| | |
| | | } |
| | | |
| | | public void createTableMeta() throws Exception { |
| | | if (TypeCode_Import .equalsIgnoreCase(typeCode)) { |
| | | if (FileIOTypeCode.Import.equals(typeCode)) { |
| | | toMeta = EntityMeta.getInstance(toName); |
| | | } |
| | | else if (TypeCode_DB.equalsIgnoreCase(typeCode)) { |
| | | else if (FileIOTypeCode.Db.equals(typeCode)) { |
| | | fromMeta = EntityMeta.getInstance(fromName); |
| | | toMeta = EntityMeta.getInstance(toName); |
| | | } |
| | | else if (TypeCode_Output.equalsIgnoreCase(typeCode)) { |
| | | else if (FileIOTypeCode.Output.equals(typeCode)) { |
| | | fromMeta = EntityMeta.getInstance(fromName); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | public String getTypeCode() { |
| | | public FileIOTypeCode getTypeCode() { |
| | | return typeCode; |
| | | } |
| | | |
| | |
| | | public IFileContext getContext() { |
| | | return context; |
| | | } |
| | | |
| | | |
| | | public int getLoglevel() { |
| | | return loglevel; |
| | | } |
| | | |
| | | |
| | | public void setLoglevel(int loglevel) { |
| | | this.loglevel = loglevel; |
| | | } |
| | | |
| | | |
| | | } |