forked from cloudist/codfuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataScopeEnum.java
More file actions
50 lines (41 loc) · 1.28 KB
/
Copy pathDataScopeEnum.java
File metadata and controls
50 lines (41 loc) · 1.28 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
package xxx.xxx.xxx.datascope.enums;
public enum DataScopeEnum {
ALL(1, "全部"),
OWN(2, "本人可见"),
OWN_DEPT(3, "所在机构可见"),
OWN_DEPT_CHILD(4, "所在机构及子级可见"),
CUSTOM(5, "自定义");
private final int type;
private final String description;
public static DataScopeEnum of(Integer dataScopeType) {
/*==============================================*/
/**
* 迷惑行为No.1
*/
if (dataScopeType == null) {
return null;
} else {
DataScopeEnum[] values = values();
DataScopeEnum[] var2 = values;
int var3 = values.length;
for(int var4 = 0; var4 < var3; ++var4) {
DataScopeEnum scopeTypeEnum = var2[var4];
if (scopeTypeEnum.type == dataScopeType) {
return scopeTypeEnum;
}
}
return null;
}
/*==============================================*/
}
public int getType() {
return this.type;
}
public String getDescription() {
return this.description;
}
private DataScopeEnum(final int type, final String description) {
this.type = type;
this.description = description;
}
}