P15GEN2\59518
2024-05-29 d4210c7c4b04abde20037ea8aa0f54ef8a2649aa
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
106
107
108
109
110
111
112
113
package foundation.state;
 
import foundation.action.IState;
import foundation.data.entity.Entity;
 
public class State implements IState {
 
    private String id;
    private String code;
    private String categoryCode;
    private String name;
    private boolean inFreedom;
    private boolean step;
    private String stepName;
    private int indexNo;
    
    public State() {
        
    }
    
    public State(String code, String name) {
        this.code = code;
        this.name = name;
    }
    
    public void load(Entity entity) throws Exception {
        id = entity.getString("id");
        code = entity.getString("code");
        categoryCode = entity.getString("category_code");
        name = entity.getString("name");    
        inFreedom = entity.getBoolean("is_in_freedom", true);
        step = entity.getBoolean("is_step", false);
        stepName = entity.getString("step_name");
        indexNo =  entity.getInt("index_no");
    }
 
    public static State stateCopy(State source) {
        State target = new State();
        target.setId(source.getId());
        target.setCode(source.getCode());
        target.setCategoryCode(source.getCategoryCode());
        target.setName(source.getName());
        target.setStep(source.isStep());
        target.setStepName(source.getStepName());
        target.setIndexNo(source.getIndexNo());
        return target;
    }
 
    public String getId() {
        return id;
    }
 
    public void setId(String id) {
        this.id = id;
    }
 
    public String getCode() {
        return code;
    }
 
    public void setCode(String code) {
        this.code = code;
    }
 
    public String getCategoryCode() {
        return categoryCode;
    }
 
    public void setCategoryCode(String categoryCode) {
        this.categoryCode = categoryCode;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public boolean isInFreedom() {
        return inFreedom;
    }
 
    public void setInFreedom(boolean inFreedom) {
        this.inFreedom = inFreedom;
    }
 
    public boolean isStep() {
        return step;
    }
 
    public void setStep(boolean step) {
        this.step = step;
    }
 
    public String getStepName() {
        return stepName;
    }
 
    public void setStepName(String stepName) {
        this.stepName = stepName;
    }
 
    public int getIndexNo() {
        return indexNo;
    }
 
    public void setIndexNo(int indexNo) {
        this.indexNo = indexNo;
    }
 
}