6
jinlin
2023-12-03 c8d8a511f45c96ed3a5123a88e48de2ffdbf632a
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package com.zt.generator.data;
 
import java.io.Serializable;
import java.sql.Types;
 
public class DataColumn implements Serializable, Cloneable {
 
    public static final int DATETIME = 0;
 
    public static final int STRING = 1;
 
    public static final int BLOB = 2;
 
    public static final int BIGDECIMAL = 3;
 
    public static final int DECIMAL = 4;
 
    public static final int FLOAT = 5;
 
    public static final int DOUBLE = 6;
 
    public static final int LONG = 7;
 
    public static final int INTEGER = 8;
 
    public static final int SMALLINT = 9;
 
    public static final int CLOB = 10;
 
    public static final int INT = 11;
 
    public static final int DATE = 12;
 
    protected String ColumnName;
 
    protected int ColumnType;
 
    protected boolean isAllowNull = true;
 
    protected String dateFormat = null;
 
    public DataColumn() {
 
    }
 
    public Object clone() {
        return new DataColumn(this.ColumnName, this.ColumnType);
    }
 
    public DataColumn(String columnName, int columnType) {
        this.ColumnName = columnName;
        this.ColumnType = columnType;
    }
 
    public DataColumn(String columnName, int columnType, boolean allowNull) {
        this.ColumnName = columnName;
        this.ColumnType = columnType;
        this.isAllowNull = allowNull;
    }
 
    public String getColumnName() {
        return ColumnName;
    }
 
    public void setColumnName(String columnName) {
        ColumnName = columnName;
    }
 
    public int getColumnType() {
        return ColumnType;
    }
 
    public void setColumnType(int columnType) {
        ColumnType = columnType;
    }
 
    public boolean isAllowNull() {
        return isAllowNull;
    }
 
    public void setAllowNull(boolean isAllowNull) {
        this.isAllowNull = isAllowNull;
    }
 
    /**
     *
     * @param sqlType
     * @return
     */
    public static Class getDataType(int sqlType) {
        switch (sqlType) {
        case Types.ARRAY:
            break;
        }
        return null;
    }
 
    public String getDateFormat() {
        return dateFormat;
    }
 
    public void setDateFormat(String dateFormat) {
        this.dateFormat = dateFormat;
    }
}