david-PC\david
2018-06-12 f240ac3ccd37c541cab2c21cfc433d3510999a3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package frame.file;
 
import frame.data.Entity;
import frame.data.meta.EntityMeta;
import frame.expression.VariantContext;
 
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 String mappingId;
    private boolean distinctSelect;
    private boolean standardMove;
    private String[] filterFieldValues;
    private String[] keyFieldPairs;
    private AppendMode appendMode;
    private DeleteMode deleteMode;
    private Direction direction;
    private int fromRowNo;
    private int toRowNo;
    
    private EntityMeta fromMeta;
    private EntityMeta toMeta;
    private IOMapping mapping;
    private IOMappingRuntime mappingRuntime;
    private VariantContext context;
 
    public FileIoItem() {
        mapping = new IOMapping();
    }
    
 
    @Override
    public VariantContext createContext(UploadResult result) {
        // TODO Auto-generated method stub
        return null;
    }
 
 
    @Override
    public void initLoad(Entity entity) {
        
    }
    
    public void createTableMeta() {
        if (TypeCode_Import .Equals(typeCode)) {
            toMeta = new TableMeta(toName);
        }
        else if (TypeCode_DB.Equals(typeCode)) {
            fromMeta = new TableMeta(fromName);
            toMeta = new TableMeta(toName);
        }
        else if (TypeCode_Output.Equals(typeCode)) {
            fromMeta = new TableMeta(fromName);
        }
    }
 
}