Dict.java
1.78 KB
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
/**
* Copyright © 2015-2018 ODM All rights reserved.
*/
package com.thinkgem.jeesite.modules.sys.entity;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAttribute;
import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.common.persistence.DataEntity;
/**
* 字典Entity
* @author ThinkGem
* @version 2013-05-15
*/
public class Dict extends DataEntity<Dict> {
private static final long serialVersionUID = 1L;
private String value; // 数据值
private String label; // 标签名
private String type; // 类型
private String description;// 描述
private Integer sort; // 排序
private String parentId;//父Id
public Dict() {
super();
}
public Dict(String id){
super(id);
}
public Dict(String value, String label){
this.value = value;
this.label = label;
}
@XmlAttribute
@Length(min=1, max=100)
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@XmlAttribute
@Length(min=1, max=100)
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
@Length(min=1, max=100)
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@XmlAttribute
@Length(min=0, max=100)
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@NotNull
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Length(min=1, max=100)
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
@Override
public String toString() {
return label + value;
}
}