1
2
3
4
5 package gboat2.web.util;
6
7 import gboat2.base.core.model.Parameter;
8 import gboat2.base.core.service.IParameterService;
9 import gboat2.base.core.util.SpringContextUtil;
10
11
12
13
14
15
16
17
18
19 public abstract class ParameterUtil {
20 private ParameterUtil() {
21 super();
22
23 }
24
25
26
27
28
29
30 public static Parameter getParameter(String jsonOfParameter){
31 return getParameterService().getParameter(jsonOfParameter);
32 }
33
34
35
36
37
38
39
40 public static Parameter getParameterByCode(String code){
41 return getParameterService().getParameterByCode(code);
42 }
43
44
45
46
47
48
49 public static String getValueByCode(String code){
50 return getParameterService().getValueByCode(code);
51 }
52
53
54
55
56
57
58 public static boolean hasCodeByCode(String code){
59 return getParameterService().hasCodeByCode(code);
60 }
61
62
63 private static IParameterService getParameterService() {
64 return (IParameterService) SpringContextUtil.getInstance().getBeanOfId("parameteServiceH");
65 }
66 }