wzy
2021-11-30 0e5aaeba97021c289485a652ec6af0bb37f92af7
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
114
115
116
117
118
package com.xzx.gc.role.gen.model;
 
import java.util.ArrayList;
import java.util.List;
 
public class Entity {
    String name;
    String tableName;
    String code;
    String displayName;
    ArrayList<Attribute> list = new ArrayList<Attribute>();
    Attribute idAttribute;
    Attribute nameAttribute;
    String comment;
    String system;
    //是否生成excel导入导出按钮
    boolean includeExcel =false;
    //是否包含附件信息
    boolean attachment=false;
    //是否生成代码,也同时生成功能点
    boolean autoAddFunction = false;
    boolean autoAddMenu = false;
    
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getTableName() {
        return tableName;
    }
    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getDisplayName() {
        if(displayName==null) {
            return this.displayName;
        }
        return displayName;
    }
    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }
    public ArrayList<Attribute> getList() {
        return list;
    }
    public void setList(ArrayList<Attribute> list) {
        this.list = list;
    }
    public Attribute getIdAttribute() {
        return idAttribute;
    }
    public void setIdAttribute(Attribute idAttribute) {
        this.idAttribute = idAttribute;
    }
    public Attribute getNameAttribute() {
        return nameAttribute;
    }
    public void setNameAttribute(Attribute nameAttribute) {
        this.nameAttribute = nameAttribute;
    }
    
    public String getSystem() {
        return system;
    }
    public void setSystem(String system) {
        this.system = system;
    }
    public String getComment() {
        return comment;
    }
    public void setComment(String comment) {
        this.comment = comment;
    }
    
    public List<Attribute> getGeneralList(){
        List<Attribute> newList = new ArrayList<Attribute>();
        for(Attribute attr:list) {
            if(attr.getName().equals(this.idAttribute.getName())) {
                continue;
            }
            newList.add(attr);
        }
        return newList;
    }
    public boolean isIncludeExcel() {
        return includeExcel;
    }
    public void setIncludeExcel(boolean includeExcel) {
        this.includeExcel = includeExcel;
    }
    public boolean isAttachment() {
        return attachment;
    }
    public void setAttachment(boolean attachment) {
        this.attachment = attachment;
    }
    public boolean isAutoAddFunction() {
        return autoAddFunction;
    }
    public void setAutoAddFunction(boolean autoAddFunction) {
        this.autoAddFunction = autoAddFunction;
    }
    public boolean isAutoAddMenu() {
        return autoAddMenu;
    }
    public void setAutoAddMenu(boolean autoAddMenu) {
        this.autoAddMenu = autoAddMenu;
    }
    
}