|
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 |
| package org.objectweb.easybeans.tests.common.ejbs.base; |
|
26 |
| |
|
27 |
| import static org.objectweb.easybeans.tests.common.helper.ContextHelper.checkSimpleEntry; |
|
28 |
| |
|
29 |
| import javax.annotation.Resource; |
|
30 |
| import javax.ejb.SessionContext; |
|
31 |
| |
|
32 |
| |
|
33 |
| |
|
34 |
| |
|
35 |
| |
|
36 |
| |
|
37 |
| public class EBaseSimpleEnvEntry00 implements ItfSimpleEnvEntry { |
|
38 |
| |
|
39 |
| |
|
40 |
| |
|
41 |
| |
|
42 |
| @Resource |
|
43 |
| private SessionContext sessionContext; |
|
44 |
| |
|
45 |
| |
|
46 |
| |
|
47 |
| |
|
48 |
| @Resource(name = "str00") |
|
49 |
| private String strInjection; |
|
50 |
| |
|
51 |
| |
|
52 |
| |
|
53 |
| |
|
54 |
| @Resource(name = "chr00") |
|
55 |
| public char chrInjection; |
|
56 |
| |
|
57 |
| |
|
58 |
| |
|
59 |
| |
|
60 |
| @Resource(name = "int00") |
|
61 |
| private int intInjection; |
|
62 |
| |
|
63 |
| |
|
64 |
| |
|
65 |
| |
|
66 |
| public boolean bolInjection = false; |
|
67 |
| |
|
68 |
| |
|
69 |
| |
|
70 |
| |
|
71 |
| private double dblInjection; |
|
72 |
| |
|
73 |
| |
|
74 |
| |
|
75 |
| |
|
76 |
| private byte bteInjection; |
|
77 |
| |
|
78 |
| |
|
79 |
| |
|
80 |
| |
|
81 |
| private short shrInjection; |
|
82 |
| |
|
83 |
| |
|
84 |
| |
|
85 |
| |
|
86 |
| private long lngInjection; |
|
87 |
| |
|
88 |
| |
|
89 |
| |
|
90 |
| |
|
91 |
| private float fltInjection; |
|
92 |
| |
|
93 |
| |
|
94 |
| |
|
95 |
| |
|
96 |
| |
|
97 |
1
| @Resource(name = "dbl00")
|
|
98 |
| public void setDblInjection(final double value) { |
|
99 |
1
| dblInjection = value;
|
|
100 |
| } |
|
101 |
| |
|
102 |
| |
|
103 |
| |
|
104 |
| |
|
105 |
| |
|
106 |
1
| @Resource(name = "bte00")
|
|
107 |
| private void setBteInjection(final byte value) { |
|
108 |
1
| bteInjection = value;
|
|
109 |
| } |
|
110 |
| |
|
111 |
| |
|
112 |
| |
|
113 |
| |
|
114 |
| |
|
115 |
1
| @Resource(name = "shr00")
|
|
116 |
| private void setShrInjection(final short value) { |
|
117 |
1
| shrInjection = value;
|
|
118 |
| } |
|
119 |
| |
|
120 |
| |
|
121 |
| |
|
122 |
| |
|
123 |
| |
|
124 |
1
| @Resource(name = "lng00")
|
|
125 |
| protected void setLngInjection(final long value) { |
|
126 |
1
| lngInjection = value;
|
|
127 |
| } |
|
128 |
| |
|
129 |
| |
|
130 |
| |
|
131 |
| |
|
132 |
| |
|
133 |
| |
|
134 |
1
| @Resource
|
|
135 |
| void setFltInjection(final float value) { |
|
136 |
1
| fltInjection = value;
|
|
137 |
| } |
|
138 |
| |
|
139 |
| |
|
140 |
| |
|
141 |
| |
|
142 |
1
| public void checkString00() {
|
|
143 |
1
| checkSimpleEntry(sessionContext, "str00", strInjection, ENTRY_STRING);
|
|
144 |
| } |
|
145 |
| |
|
146 |
| |
|
147 |
| |
|
148 |
| |
|
149 |
1
| @SuppressWarnings("boxing")
|
|
150 |
| public void checkCharacter00() { |
|
151 |
1
| checkSimpleEntry(sessionContext, "chr00", chrInjection, ENTRY_CHARACTER);
|
|
152 |
| } |
|
153 |
| |
|
154 |
| |
|
155 |
| |
|
156 |
| |
|
157 |
1
| @SuppressWarnings("boxing")
|
|
158 |
| public void checkInteger00() { |
|
159 |
1
| checkSimpleEntry(sessionContext, "int00", intInjection, ENTRY_INTEGER);
|
|
160 |
| } |
|
161 |
| |
|
162 |
| |
|
163 |
| |
|
164 |
| |
|
165 |
1
| @SuppressWarnings("boxing")
|
|
166 |
| public void checkBoolean00() { |
|
167 |
1
| if (bolInjection) {
|
|
168 |
0
| throw new IllegalStateException("The value should be false.");
|
|
169 |
| } |
|
170 |
| } |
|
171 |
| |
|
172 |
| |
|
173 |
| |
|
174 |
| |
|
175 |
1
| @SuppressWarnings("boxing")
|
|
176 |
| public void checkDouble00() { |
|
177 |
1
| checkSimpleEntry(sessionContext, "dbl00", dblInjection, ENTRY_DOUBLE);
|
|
178 |
| } |
|
179 |
| |
|
180 |
| |
|
181 |
| |
|
182 |
| |
|
183 |
2
| @SuppressWarnings("boxing")
|
|
184 |
| public void checkByte00() { |
|
185 |
2
| checkSimpleEntry(sessionContext, "bte00", bteInjection, ENTRY_BYTE);
|
|
186 |
| } |
|
187 |
| |
|
188 |
| |
|
189 |
| |
|
190 |
| |
|
191 |
0
| @SuppressWarnings("boxing")
|
|
192 |
| public void checkShort00() { |
|
193 |
0
| checkSimpleEntry(sessionContext, "shr00", shrInjection, ENTRY_SHORT);
|
|
194 |
| } |
|
195 |
| |
|
196 |
| |
|
197 |
| |
|
198 |
| |
|
199 |
| |
|
200 |
1
| @SuppressWarnings("boxing")
|
|
201 |
| public void checkLong00() { |
|
202 |
1
| checkSimpleEntry(sessionContext, "lng00", lngInjection, ENTRY_LONG);
|
|
203 |
| } |
|
204 |
| |
|
205 |
| |
|
206 |
| |
|
207 |
| |
|
208 |
| |
|
209 |
1
| @SuppressWarnings("boxing")
|
|
210 |
| public void checkFloat00() { |
|
211 |
1
| checkSimpleEntry(sessionContext, EBaseSimpleEnvEntry00.class.getName().toString() + "/" + "fltInjection",
|
|
212 |
| fltInjection, ENTRY_FLOAT); |
|
213 |
| } |
|
214 |
| |
|
215 |
| } |