1 23 24 package org.objectweb.jorm.naming.api; 25 26 import org.objectweb.jorm.type.api.PType; 27 import org.objectweb.jorm.api.PException; 28 29 import java.util.Date ; 30 import java.math.BigDecimal ; 31 import java.math.BigInteger ; 32 33 40 public interface PNameCoder { 41 44 static final int CTBYTE = 0x0001; 45 48 static final int CTCHAR = 0x0002; 49 52 static final int CTSHORT = 0x0004; 53 56 static final int CTINT = 0x0008; 57 60 static final int CTLONG = 0x0010; 61 64 static final int CTOBYTE = 0x0020; 65 68 static final int CTOCHAR = 0x0040; 69 72 static final int CTOSHORT = 0x0080; 73 76 static final int CTOINT = 0x0100; 77 80 static final int CTOLONG = 0x0200; 81 84 static final int CTSTRING = 0x0400; 85 88 static final int CTDATE = 0x0800; 89 92 static final int CTCHARARRAY = 0x1000; 93 96 static final int CTBYTEARRAY = 0x2000; 97 100 static final int CTBIGINTEGER = 0x4000; 101 104 static final int CTBIGDECIMAL = 0x8000; 105 109 static final int CTSYSTEM = 0x10000; 110 114 static final int CTCOMPOSITE = 0x80000; 115 116 123 boolean codingSupported(int codingtype); 124 125 133 PName decode(byte[] en) throws PExceptionNaming; 134 135 146 PName decodeAbstract(Object en, Object context) throws PExceptionNaming, UnsupportedOperationException ; 147 148 155 PName decodeByte(byte en) throws PExceptionNaming, UnsupportedOperationException ; 156 157 164 PName decodeObyte(Byte en) throws PExceptionNaming, UnsupportedOperationException ; 165 166 173 PName decodeChar(char en) throws PExceptionNaming, UnsupportedOperationException ; 174 175 182 PName decodeOchar(Character en) throws PExceptionNaming, UnsupportedOperationException ; 183 184 191 PName decodeInt(int en) throws PExceptionNaming, UnsupportedOperationException ; 192 193 200 PName decodeOint(Integer en) throws PExceptionNaming, UnsupportedOperationException ; 201 202 209 PName decodeLong(long en) throws PExceptionNaming, UnsupportedOperationException ; 210 211 218 PName decodeOlong(Long en) throws PExceptionNaming, UnsupportedOperationException ; 219 220 227 PName decodeShort(short en) throws PExceptionNaming, UnsupportedOperationException ; 228 229 236 PName decodeOshort(Short en) throws PExceptionNaming, UnsupportedOperationException ; 237 238 245 PName decodeString(String en) throws PExceptionNaming; 246 247 254 PName decodeCharArray(char[] en) throws PExceptionNaming; 255 256 263 PName decodeDate(Date en) throws PExceptionNaming; 264 265 272 PName decodeBigInteger(BigInteger en) throws PExceptionNaming; 273 274 281 PName decodeBigDecimal(BigDecimal en) throws PExceptionNaming; 282 283 291 byte[] encode(PName pn) throws PExceptionNaming; 292 293 302 Object encodeAbstract(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 303 304 311 byte encodeByte(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 312 313 320 Byte encodeObyte(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 321 322 329 char encodeChar(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 330 331 338 Character encodeOchar(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 339 340 347 int encodeInt(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 348 349 356 Integer encodeOint(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 357 358 365 long encodeLong(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 366 367 374 Long encodeOlong(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 375 376 383 short encodeShort(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 384 385 392 Short encodeOshort(PName pn) throws PExceptionNaming, UnsupportedOperationException ; 393 394 401 String encodeString(PName pn) throws PExceptionNaming; 402 403 410 char[] encodeCharArray(PName pn) throws PExceptionNaming; 411 412 419 Date encodeDate(PName pn) throws PExceptionNaming; 420 421 428 BigInteger encodeBigInteger(PName pn) throws PExceptionNaming; 429 430 437 BigDecimal encodeBigDecimal(PName pn) throws PExceptionNaming; 438 439 443 PName getNull(); 444 445 451 void setNullPName(Object o) throws PException; 452 453 459 boolean supportDynamicComposite(); 460 461 470 boolean supportCompositeField(String fn, PType ft); 471 472 479 boolean supportStaticComposite(); 480 481 486 PType getPType(); 487 488 489 495 void setPType(PType pt); 496 } 497 | Popular Tags |