質問編集履歴

1

MAX2 は以下になっています

2018/07/25 08:58

投稿

riomakopa
riomakopa

スコア30

test CHANGED
File without changes
test CHANGED
@@ -17,3 +17,135 @@
17
17
  @Max2(groups = { Update.class }, value = Integer.MAX_VALUE, allowBlank = true)
18
18
 
19
19
  @Min2(groups = { Update.class }, value = Integer.MIN_VALUE, allowBlank = true)
20
+
21
+
22
+
23
+
24
+
25
+ MAX2 は以下になっています
26
+
27
+ /**
28
+
29
+ * 最大値チェック
30
+
31
+ */
32
+
33
+ @Constraint(validatedBy = { Max2Validator.class })
34
+
35
+ @Documented
36
+
37
+ @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
38
+
39
+ @Retention(RUNTIME)
40
+
41
+ public @interface Max2 {
42
+
43
+
44
+
45
+ /**
46
+
47
+ * メッセージ取得
48
+
49
+ *
50
+
51
+ * @return メッセージ
52
+
53
+ */
54
+
55
+ String message() default "{}";
56
+
57
+
58
+
59
+ /**
60
+
61
+ * グループ取得
62
+
63
+ *
64
+
65
+ * @return グループ
66
+
67
+ */
68
+
69
+ Class<?>[] groups() default { };
70
+
71
+
72
+
73
+ /**
74
+
75
+ * ペイロード取得
76
+
77
+ *
78
+
79
+ * @return ペイロード
80
+
81
+ */
82
+
83
+ Class<? extends Payload>[] payload() default { };
84
+
85
+
86
+
87
+ /**
88
+
89
+ * @return value the element must be higher or equal to
90
+
91
+ */
92
+
93
+ double value();
94
+
95
+
96
+
97
+ /**
98
+
99
+ * @return signed of accepted
100
+
101
+ */
102
+
103
+ boolean allowSign() default true;
104
+
105
+
106
+
107
+ /**
108
+
109
+ * @return blank of accepted
110
+
111
+ */
112
+
113
+ boolean allowBlank() default true;
114
+
115
+
116
+
117
+ /**
118
+
119
+ * Defines several {@link Max2} annotations on the same element.
120
+
121
+ *
122
+
123
+ * @see Max2
124
+
125
+ */
126
+
127
+ @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
128
+
129
+ @Retention(RUNTIME)
130
+
131
+ @Documented
132
+
133
+ @interface List {
134
+
135
+
136
+
137
+ /**
138
+
139
+ * 設定値取得
140
+
141
+ *
142
+
143
+ * @return 設定値
144
+
145
+ */
146
+
147
+ Max2[] value();
148
+
149
+ }
150
+
151
+ }