1 28 package org.objectweb.jonas_ejb.container.jorm; 29 30 import org.objectweb.jorm.api.PIndexedElem; 31 import org.objectweb.jorm.api.PException; 32 import org.objectweb.jorm.naming.api.PName; 33 import org.objectweb.jorm.type.api.PExceptionTyping; 34 import org.objectweb.jonas_ejb.container.TraceEjb; 35 import org.objectweb.util.monolog.api.BasicLevel; 36 37 import java.util.Date ; 38 import java.io.Serializable ; 39 import java.math.BigDecimal ; 40 41 48 public class GenClassElement implements PIndexedElem { 49 50 54 public byte status = PIndexedElem.ELEM_UNMODIFIED; 55 56 public boolean hasBeenCreated = false; 57 58 62 public PName pname = null; 63 64 68 public PObject value = null; 69 70 74 public GenClassImpl gc = null; 75 76 77 public GenClassElement(GenClassImpl gc) { 78 this.gc = gc; 79 } 80 81 84 public byte getElemStatus() { 85 return status; 86 } 87 88 public PName pieGetRefElem() throws PException { 89 if (pname == null) { 90 pname = gc.gcObject2ref(value); 91 } 92 if (TraceEjb.genclass.isLoggable(BasicLevel.DEBUG)) { 93 TraceEjb.genclass.log(BasicLevel.DEBUG, "pn=" + pname); 94 } 95 return pname; 96 } 97 100 public void pieSetRefElem(PName pn) throws PException { 101 pname = pn; 102 value = null; 103 if (TraceEjb.genclass.isLoggable(BasicLevel.DEBUG)) { 104 TraceEjb.genclass.log(BasicLevel.DEBUG, "pn=" + pname); 105 } 106 } 107 108 public boolean pieGetBooleanElem() throws PException { 109 throw new PExceptionTyping("Bad elem type: asked: boolean, been: object"); 110 } 111 public Boolean pieGetObooleanElem() throws PException { 112 throw new PExceptionTyping("Bad elem type: asked: Boolean, been: object"); 113 } 114 public byte pieGetByteElem() throws PException { 115 throw new PExceptionTyping("Bad elem type: asked: byte, been: object"); 116 } 117 public Byte pieGetObyteElem() throws PException { 118 throw new PExceptionTyping("Bad elem type: asked: Byte, been: object"); 119 } 120 public byte pieGetByteIndexField(String fn) throws PException { 121 throw new PExceptionTyping("No index"); 122 } 123 public Byte pieGetObyteIndexField(String fn) throws PException { 124 throw new PExceptionTyping("No index"); 125 } 126 public char pieGetCharElem() throws PException { 127 throw new PExceptionTyping("Bad elem type: asked: char, been: object"); 128 } 129 public Character pieGetOcharElem() throws PException { 130 throw new PExceptionTyping("Bad elem type: asked: Char, been: object"); 131 } 132 public char pieGetCharIndexField(String fn) throws PException { 133 throw new PExceptionTyping("No index"); 134 } 135 public Character pieGetOcharIndexField(String fn) throws PException { 136 throw new PExceptionTyping("No index"); 137 } 138 public short pieGetShortElem() throws PException { 139 throw new PExceptionTyping("Bad elem type: asked: short, been: object"); 140 } 141 public Short pieGetOshortElem() throws PException { 142 throw new PExceptionTyping("Bad elem type: asked: Short, been: object"); 143 } 144 public short pieGetShortIndexField(String fn) throws PException { 145 throw new PExceptionTyping("No index"); 146 } 147 public Short pieGetOshortIndexField(String fn) throws PException { 148 throw new PExceptionTyping("No index"); 149 } 150 public int pieGetIntElem() throws PException { 151 throw new PExceptionTyping("Bad elem type: asked: int, been: object"); 152 } 153 public Integer pieGetOintElem() throws PException { 154 throw new PExceptionTyping("Bad elem type: asked: Int, been: object"); 155 } 156 public int pieGetIntIndexField(String fn) throws PException { 157 throw new PExceptionTyping("No index"); 158 } 159 public Integer pieGetOintIndexField(String fn) throws PException { 160 throw new PExceptionTyping("No index"); 161 } 162 public long pieGetLongElem() throws PException { 163 throw new PExceptionTyping("Bad elem type: asked: long, been: object"); 164 } 165 public Long pieGetOlongElem() throws PException { 166 throw new PExceptionTyping("Bad elem type: asked: Long, been: object"); 167 } 168 public long pieGetLongIndexField(String fn) throws PException { 169 throw new PExceptionTyping("No index"); 170 } 171 public Long pieGetOlongIndexField(String fn) throws PException { 172 throw new PExceptionTyping("No index"); 173 } 174 public float pieGetFloatElem() throws PException { 175 throw new PExceptionTyping("Bad elem type: asked: float, been: object"); 176 } 177 public Float pieGetOfloatElem() throws PException { 178 throw new PExceptionTyping("Bad elem type: asked: Float, been: object"); 179 } 180 public double pieGetDoubleElem() throws PException { 181 throw new PExceptionTyping("Bad elem type: asked: double, been: object"); 182 } 183 public Double pieGetOdoubleElem() throws PException { 184 throw new PExceptionTyping("Bad elem type: asked: Double, been: object"); 185 } 186 public String pieGetStringElem() throws PException { 187 throw new PExceptionTyping("Bad elem type: asked: String, been: object"); 188 } 189 public String pieGetStringIndexField(String fn) throws PException { 190 return null; 191 } 192 public Date pieGetDateElem() throws PException { 193 throw new PExceptionTyping("Bad elem type: asked: java.util.Date, been: object"); 194 } 195 public Date pieGetDateIndexField(String fn) throws PException { 196 throw new PExceptionTyping("No index"); 197 } 198 public char[] pieGetCharArrayElem() throws PException { 199 throw new PExceptionTyping("Bad elem type: asked: char[], been: object"); 200 } 201 public byte[] pieGetByteArrayElem() throws PException { 202 throw new PExceptionTyping("Bad elem type: asked: byte[], been: object"); 203 } 204 public Serializable pieGetSerializedElem() throws PException { 205 throw new PExceptionTyping("Bad elem type: asked: Serializable, been: object"); 206 } 207 public void pieSetBooleanElem(boolean value) throws PException { 208 throw new PExceptionTyping("Bad elem type: asked: boolean, been: object"); 209 } 210 public void pieSetObooleanElem(Boolean value) throws PException { 211 throw new PExceptionTyping("Bad elem type: asked: boolean, been: object"); 212 } 213 public void pieSetByteElem(byte value) throws PException { 214 throw new PExceptionTyping("Bad elem type: asked: byte, been: object"); 215 } 216 public void pieSetObyteElem(Byte value) throws PException { 217 throw new PExceptionTyping("Bad elem type: asked: Byte, been: object"); 218 } 219 public void pieSetByteIndexField(String fn, byte value) throws PException { 220 throw new PExceptionTyping("No index"); 221 } 222 public void pieSetObyteIndexField(String fn, Byte value) throws PException { 223 throw new PExceptionTyping("No index"); 224 } 225 public void pieSetCharElem(char value) throws PException { 226 throw new PExceptionTyping("Bad elem type: asked: char, been: object"); 227 } 228 public void pieSetOcharElem(Character value) throws PException { 229 throw new PExceptionTyping("Bad elem type: asked: Char, been: object"); 230 } 231 public void pieSetCharIndexField(String fn, char value) throws PException { 232 throw new PExceptionTyping("No index"); 233 } 234 public void pieSetOcharIndexField(String fn, Character value) throws PException { 235 throw new PExceptionTyping("No index"); 236 } 237 public void pieSetShortElem(short value) throws PException { 238 throw new PExceptionTyping("Bad elem type: asked: short, been: object"); 239 } 240 public void pieSetOshortElem(Short value) throws PException { 241 throw new PExceptionTyping("Bad elem type: asked: Short, been: object"); 242 } 243 public void pieSetShortIndexField(String fn, short value) throws PException { 244 throw new PExceptionTyping("No index"); 245 } 246 public void pieSetOshortIndexField(String fn, Short value) throws PException { 247 throw new PExceptionTyping("No index"); 248 } 249 public void pieSetIntElem(int value) throws PException { 250 throw new PExceptionTyping("Bad elem type: asked: int, been: object"); 251 } 252 public void pieSetOintElem(Integer value) throws PException { 253 throw new PExceptionTyping("Bad elem type: asked: Int, been: object"); 254 } 255 public void pieSetIntIndexField(String fn, int value) throws PException { 256 throw new PExceptionTyping("No index"); 257 } 258 public void pieSetOintIndexField(String fn, Integer value) throws PException { 259 throw new PExceptionTyping("No index"); 260 } 261 public void pieSetLongElem(long value) throws PException { 262 throw new PExceptionTyping("Bad elem type: asked: long, been: object"); 263 } 264 public void pieSetOlongElem(Long value) throws PException { 265 throw new PExceptionTyping("Bad elem type: asked: Long, been: object"); 266 } 267 public void pieSetLongIndexField(String fn, long value) throws PException { 268 throw new PExceptionTyping("No index"); 269 } 270 public void pieSetOlongIndexField(String fn, Long value) throws PException { 271 throw new PExceptionTyping("No index"); 272 } 273 public void pieSetFloatElem(float value) throws PException { 274 throw new PExceptionTyping("Bad elem type: asked: float, been: object"); 275 } 276 public void pieSetOfloatElem(Float value) throws PException { 277 throw new PExceptionTyping("Bad elem type: asked: Float, been: object"); 278 } 279 public void pieSetDoubleElem(double value) throws PException { 280 throw new PExceptionTyping("Bad elem type: asked: double, been: object"); 281 } 282 public void pieSetOdoubleElem(Double value) throws PException { 283 throw new PExceptionTyping("Bad elem type: asked: Double, been: object"); 284 } 285 public void pieSetStringElem(String value) throws PException { 286 throw new PExceptionTyping("Bad elem type: asked: String, been: object"); 287 } 288 public void pieSetStringIndexField(String fn, String value) throws PException { 289 throw new PExceptionTyping("No index"); 290 } 291 public void pieSetDateElem(Date value) throws PException { 292 throw new PExceptionTyping("Bad elem type: asked: java.util.Date, been: object"); 293 } 294 public void pieSetDateIndexField(String fn, Date value) throws PException { 295 throw new PExceptionTyping("No index"); 296 } 297 public void pieSetCharArrayElem(char[] value) throws PException { 298 throw new PExceptionTyping("Bad elem type: asked: char[], been: object"); 299 } 300 public void pieSetByteArrayElem(byte[] value) throws PException { 301 throw new PExceptionTyping("Bad elem type: asked: byte[], been: object"); 302 } 303 public void pieSetSerializedElem(Serializable value) throws PException { 304 throw new PExceptionTyping("Bad elem type: asked: Serializable, been: object"); 305 } 306 public BigDecimal pieGetBigDecimalElem() throws PException { 307 throw new PExceptionTyping("Bad elem type: asked: BigDecimal, been: object"); 308 } 309 public void pieSetBigDecimalElem(BigDecimal value) throws PException { 310 throw new PExceptionTyping("Bad elem type: asked: BigDecimal, been: object"); 311 } 312 public java.math.BigInteger pieGetBigIntegerElem() throws PException { 313 throw new PExceptionTyping("Bad elem type: asked: BigInteger, been: object"); 314 } 315 public void pieSetBigIntegerElem(java.math.BigInteger value) throws PException { 316 throw new PExceptionTyping("Bad elem type: asked: BigInteger, been: object"); 317 } 318 } 319 | Popular Tags |