1 25 package org.objectweb.easybeans.tests.common.ejbs.base.simpleentry; 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 import org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry; 33 34 39 public class EBaseSimpleEnvEntry00 implements ItfSimpleEnvEntry { 40 41 44 @Resource 45 private SessionContext sessionContext; 46 47 50 @Resource(name = "str00") 51 private String strInjection; 52 53 56 @Resource(name = "chr00") 57 public char chrInjection; 58 59 62 @Resource(name = "int00") 63 private int intInjection; 64 65 68 public boolean bolInjection = false; 69 70 73 private double dblInjection; 74 75 78 private byte bteInjection; 79 80 83 private short shrInjection; 84 85 88 private long lngInjection; 89 90 93 private float fltInjection; 94 95 99 @Resource(name = "dbl00") 100 public void setDblInjection(final double value) { 101 dblInjection = value; 102 } 103 104 108 @Resource(name = "bte00") 109 private void setBteInjection(final byte value) { 110 bteInjection = value; 111 } 112 113 117 @Resource(name = "shr00") 118 private void setShrInjection(final short value) { 119 shrInjection = value; 120 } 121 122 126 @Resource(name = "lng00") 127 protected void setLngInjection(final long value) { 128 lngInjection = value; 129 } 130 131 136 @Resource 137 void setFltInjection(final float value) { 138 fltInjection = value; 139 } 140 141 144 public void checkString00() { 145 checkSimpleEntry(sessionContext, "str00", strInjection, ENTRY_STRING); 146 } 147 148 151 @SuppressWarnings ("boxing") 152 public void checkCharacter00() { 153 checkSimpleEntry(sessionContext, "chr00", chrInjection, ENTRY_CHARACTER); 154 } 155 156 159 @SuppressWarnings ("boxing") 160 public void checkInteger00() { 161 checkSimpleEntry(sessionContext, "int00", intInjection, ENTRY_INTEGER); 162 } 163 164 167 @SuppressWarnings ("boxing") 168 public void checkBoolean00() { 169 if (bolInjection) { 170 throw new IllegalStateException ("The value should be false."); 171 } 172 } 173 174 177 @SuppressWarnings ("boxing") 178 public void checkDouble00() { 179 checkSimpleEntry(sessionContext, "dbl00", dblInjection, ENTRY_DOUBLE); 180 } 181 182 185 @SuppressWarnings ("boxing") 186 public void checkByte00() { 187 checkSimpleEntry(sessionContext, "bte00", bteInjection, ENTRY_BYTE); 188 } 189 190 193 @SuppressWarnings ("boxing") 194 public void checkShort00() { 195 checkSimpleEntry(sessionContext, "shr00", shrInjection, ENTRY_SHORT); 196 } 197 198 202 @SuppressWarnings ("boxing") 203 public void checkLong00() { 204 checkSimpleEntry(sessionContext, "lng00", lngInjection, ENTRY_LONG); 205 } 206 207 211 @SuppressWarnings ("boxing") 212 public void checkFloat00() { 213 checkSimpleEntry(sessionContext, EBaseSimpleEnvEntry00.class.getName().toString() + "/" + "fltInjection", 214 fltInjection, ENTRY_FLOAT); 215 } 216 217 } 218 | Popular Tags |