1 21 package org.apache.derby.impl.drda; 22 23 28 class CodePoint 29 { 30 32 static final byte FALSE = -16; 35 static final byte TRUE = -15; 38 static final int ZEROIND = 0x00; 41 42 static final int NULLDATA = 0xFF; 43 44 static final int SECCHKCD_00 = 0x00; 46 47 static final int SECCHKCD_01 = 0x01; 49 50 static final int SECCHKCD_02 = 0x02; 52 53 static final int SECCHKCD_03 = 0x03; 55 56 static final int SECCHKCD_04 = 0x04; 58 59 static final int SECCHKCD_05 = 0x05; 61 62 static final int SECCHKCD_06 = 0x06; 64 65 static final int SECCHKCD_07 = 0x07; 67 68 static final int SECCHKCD_08 = 0x08; 70 71 static final int SECCHKCD_09 = 0x09; 73 74 static final int SECCHKCD_0A = 0x0A; 76 77 static final int SECCHKCD_0B = 0x0B; 79 80 static final int SECCHKCD_0E = 0x0E; 82 83 static final int SECCHKCD_0F = 0x0F; 85 86 static final int SECCHKCD_10 = 0x10; 88 89 static final int SECCHKCD_12 = 0x12; 91 92 static final int SECCHKCD_13 = 0x13; 94 95 static final int SECCHKCD_14 = 0x14; 97 98 static final int SECCHKCD_15 = 0x15; 100 101 103 final static int EXCSAT = 0x1041; 104 final static int SYNCCTL = 0x1055; 105 final static int SYNCRSY = 0x1069; 106 final static int ACCSEC = 0x106D; 107 final static int SECCHK = 0x106E; 108 final static int SYNCLOG = 0x106F; 109 final static int ACCRDB = 0x2001; 110 final static int BGNBND = 0x2002; 111 final static int BNDSQLSTT = 0x2004; 112 final static int CLSQRY = 0x2005; 113 final static int CNTQRY = 0x2006; 114 final static int DRPPKG = 0x2007; 115 final static int DSCSQLSTT = 0x2008; 116 final static int ENDBND = 0x2009; 117 final static int EXCSQLIMM = 0x200A; 118 final static int EXCSQLSTT = 0x200B; 119 final static int EXCSQLSET = 0x2014; 120 final static int OPNQRY = 0x200C; 121 final static int PRPSQLSTT = 0x200D; 122 final static int RDBCMM = 0x200E; 123 final static int RDBRLLBCK = 0x200F; 124 final static int REBIND = 0x2010; 125 final static int DSCRDBTBL = 0x2012; 126 127 final static int SQLDTA = 0x2412; 128 final static int SQLDTARD = 0x2413; 129 final static int SQLSTT = 0x2414; 130 final static int SQLATTR = 0x2450; 131 final static int SQLSTTVRB = 0x2419; 132 final static int QRYDSC = 0x241A; 133 final static int QRYDTA = 0x241B; 134 final static int SQLRSLRD = 0x240E; 135 final static int SQLCINRD = 0x240B; 136 137 static final int ACCSECRD = 0x14AC; 142 143 static final int AGENT = 0x1403; 145 146 static final int CODPNT = 0x000C; 148 149 static final int CODPNTDR = 0x0064; 151 152 static final int CSTMBCS = 0x2435; 155 static final int CCSIDDBC = 0x119D; 157 158 static final int CCSIDMBC = 0x119E; 160 161 static final int CCSIDMGR = 0x14CC; 165 166 static final int CCSIDSBC = 0x119C; 168 169 static final int CMNAPPC = 0x1444; 175 176 static final int CMNSYNCPT = 0x147C; 181 182 static final int CMNTCPIP = 0x1474; 184 185 static final int XAMGR = 0x1C01; 187 188 static final int CRRTKN = 0x2135; 190 191 static final int TRGDFTRT = 0x213B; 193 194 static final int DICTIONARY = 0x1458; 196 197 static final int DEPERRCD = 0x119B; 199 200 static final int DSCERRCD = 0x2101; 202 203 static final int EXCSATRD = 0x1443; 205 206 static final int EXTNAM = 0x115E; 208 209 static final int FIXROWPRC = 0x2418; 211 212 static final int FRCFIXROW = 0x2410; 214 215 static final int LMTBLKPRC = 0x2417; 217 218 static final int MGRLVLLS = 0x1404; 220 221 static final int MGRLVLN = 0x1473; 224 225 static final int MONITOR = 0x1900; 227 228 static final int MONITORRD = 0x1C00; 230 231 static final int NEWPASSWORD = 0x11DE; 233 234 static final int PASSWORD = 0x11A1; 236 237 static final int PKGDFTCST = 0x2125; 239 240 static final int PKGID = 0x2109; 242 243 static final int MAXBLKEXT = 0x2141; 245 246 static final int MAXRSLCNT = 0x2140; 248 249 static final int RSLSETFLG = 0x2142; 251 252 static final int RDBCMTOK = 0x2105; 254 255 static final int PKGNAMCT = 0x2112; 257 258 static final int PKGSNLST = 0x2139; 260 261 static final int PRCCNVCD = 0x113F; 263 264 static final int PRDID = 0x112E; 266 267 static final int OUTOVR = 0x2415; 269 270 static final int OUTOVROPT = 0x2147; 272 273 static final int PKGCNSTKN = 0x210D; 275 276 static final int PRDDTA = 0x2104; 278 279 static final int QRYINSID = 0x215B; 281 282 static final int QRYBLKCTL = 0x2132; 284 285 static final int QRYBLKSZ = 0x2114; 287 288 static final int QRYPRCTYP = 0x2102; 290 291 static final int QRYCLSIMP = 0x215D; 293 294 static final int QRYCLSRLS = 0x215E; 296 297 static final int QRYOPTVAL = 0x215F; 299 300 static final int QRYDEL = 0x2; 302 303 static final int QRYRDO = 0x1; 305 306 static final int QRYINS = 0x1; 308 309 static final int QRYSNSSTC = 0x2; 311 312 static final int NBRROW = 0x213A; 314 315 static final int OUTEXP = 0x2111; 317 318 static final int PRCNAM = 0x2138; 320 321 static final int QRYATTUPD = 0x2150; 323 324 static final int QRYUPD = 0x4; 326 327 static final int RDB = 0x240F; 329 330 static final int RDBACCCL = 0x210F; 332 333 static final int RDBALWUPD = 0x211A; 335 336 static final int QRYRELSCR = 0x213C; 338 339 static final int QRYSCRORN = 0x2152; 341 342 static final int QRYROWNBR = 0x213D; 344 345 static final int QRYROWSNS = 0x2153; 347 348 static final int QRYRFRTBL = 0x213E; 350 351 static final int QRYATTSCR = 0x2149; 353 354 static final int QRYATTSNS = 0x2157; 356 357 static final int QRYBLKRST = 0x2154; 359 360 static final int QRYROWSET = 0x2156; 362 363 static final int QRYRTNDTA = 0x2155; 365 366 static final int RDBINTTKN = 0x2103; 368 369 static final int RDBNAM = 0x2110; 371 372 static final int RDBCOLID = 0x2108; 374 375 static final int RSCNAM = 0x112D; 377 378 static final int RSCTYP = 0x111F; 380 381 static final int RSNCOD = 0x1127; 383 384 static final int RSYNCMGR = 0x14C1; 389 390 static final int RTNSQLDA = 0x2116; 392 393 static final int TYPSQLDA = 0x2146; 395 396 static final int SECCHKCD = 0x11A4; 398 399 static final int SECMEC = 0x11A2; 401 402 static final int SECMGR = 0x1440; 404 405 static final int SECMGRNM = 0x1196; 407 408 static final int SECTKN = 0x11DC; 410 411 static final int RTNEXTDTA = 0x2148; 413 414 static final int RTNEXTROW = 0x1; 416 417 static final int RTNEXTALL = 0x2; 419 420 static final int SPVNAM = 0x115D; 422 423 static final int SQLAM = 0x2407; 425 426 static final int SQLCARD = 0x2408; 428 429 static final int SQLCSRHLD = 0x211F; 431 432 static final int SQLDARD = 0x2411; 434 435 static final int SRVCLSNM = 0x1147; 437 438 static final int SRVDGN = 0x1153; 440 441 static final int SRVLST = 0x244E; 443 444 static final int SRVNAM = 0x116D; 446 447 static final int SRVRLSLV = 0x115A; 449 450 static final int STTDECDEL = 0x2121; 452 453 static final int STTSTRDEL = 0x2120; 455 456 static final int SUPERVISOR = 0x143C; 459 460 static final int SVCERRNO = 0x11B4; 462 463 static final int SVRCOD = 0x1149; 465 466 static final int SYNCPTMGR = 0x14C0; 471 472 static final int SYNERRCD = 0x114A; 474 475 static final int TYPDEFNAM = 0x002F; 477 478 static final int TYPDEFOVR = 0x0035; 480 481 static final int UOWDSP = 0x2115; 483 484 static final int USRID = 0x11A0; 486 487 static final int VRSNAM = 0x1144; 489 490 static final int PKGNAMCSN = 0x2113; 493 494 static final int DIAGLVL = 0x2160; 496 497 499 static final int DSCINVRM = 0x220A; 501 502 static final int CMDATHRM = 0x121C; 504 505 static final int CMDCHKRM = 0x1254; 507 508 static final int CMDNSPRM = 0x1250; 510 511 static final int AGNPRMRM = 0x1232; 513 514 static final int BGNBNDRM = 0x2208; 515 516 static final int ABNUOWRM = 0x220D; 518 519 static final int ACCRDBRM = 0x2201; 523 524 final static int CMDCMPRM = 0x124B; 525 526 final static int MGRLVLRM = 0x1210; 527 528 static final int MGRDEPRM = 0x1218; 530 531 static final int ENDUOWRM = 0x220C; 533 534 static final int OBJNSPRM = 0x1253; 536 537 static final int PRCCNVRM = 0x1245; 539 540 static final int PRMNSPRM = 0x1251; 542 543 static final int PKGBNARM = 0x2206; 545 546 static final int PKGBPARM = 0x2209; 548 549 static final int QRYNOPRM = 0x2202; 551 552 static final int QRYPOPRM = 0x220F; 554 555 static final int RDBACCRM = 0x2207; 557 558 static final int SECCHKRM = 0x1219; 561 562 static final int RDBAFLRM = 0x221A; 564 565 static final int RDBATHRM = 0x22CB; 567 568 static final int RDBNACRM = 0x2204; 570 571 static final int RDBNFNRM = 0x2211; 573 574 static final int RDBUPDRM = 0x2218; 576 577 static final int RSCLMTRM = 0x1233; 579 580 static final int SYNTAXRM = 0x124C; 582 583 static final int TRGNSPRM = 0x125F; 585 586 static final int VALNSPRM = 0x1252; 588 589 static final int SQLERRRM = 0x2213; 591 592 final static int OPNQRYRM = 0x2205; 593 final static int ENDQRYRM = 0x220B; 594 final static int DTAMCHRM = 0x220E; 595 final static int OPNQFLRM = 0x2212; 596 final static int RSLSETRM = 0x2219; 597 final static int CMDVLTRM = 0x221D; 598 final static int CMMRQSRM = 0x2225; 599 600 602 static final int TYPSQLDA_STD_OUTPUT = 0; 604 605 static final int TYPSQLDA_STD_INPUT = 1; 607 608 static final int TYPSQLDA_LIGHT_OUTPUT = 2; 610 611 static final int TYPSQLDA_LIGHT_INPUT = 3; 613 614 static final int TYPSQLDA_X_OUTPUT = 4; 616 617 static final int TYPSQLDA_X_INPUT = 5; 619 620 621 622 static final int QRYCLSIMP_SERVER_CHOICE = 0x00; 625 626 static final int QRYCLSIMP_YES = 0x01; 629 630 static final int QRYCLSIMP_NO = 0x02; 633 634 static final int QRYCLSRLS_NO = 0x00; 636 637 static final int QRYCLSRLS_YES = 0x01; 639 640 static final int QRYBLKFCT_NONE = 0x00; 643 644 static final int QRYBLKEXA = 0x00; 648 649 static final int QRYBLKFLX = 0x01; 653 654 static final byte DIAGLVL0 = (byte)0xF0; 660 static final byte DIAGLVL1 = (byte)0xF1; 661 static final byte DIAGLVL2 = (byte)0xF2; 662 663 665 static final int EXTDTA = 0x146C; 667 668 static final int FDODSC = 0x0010; 670 671 static final int FDODTA = 0x147A; 673 674 static final int FDODSCOFF = 0x2118; 676 677 static final int FDOPRMOFF = 0x212B; 679 680 static final int FDOTRPOFF = 0x212A; 682 683 static final int SYNERRCD_DSS_LESS_THAN_6 = 0x01; 685 static final int SYNERRCD_DSS_LENGTH_BYTE_NUMBER_MISMATCH = 0x02; 686 static final int SYNERRCD_CBYTE_NOT_D0 = 0x03; 687 static final int SYNERRCD_FBYTE_NOT_SUPPORTED = 0x04; 688 static final int SYNERRCD_OBJ_LEN_LESS_THAN_4 = 0x07; 689 static final int SYNERRCD_TOO_BIG = 0x09; 690 static final int SYNERRCD_OBJ_LEN_NOT_ALLOWED = 0x0B; 691 static final int SYNERRCD_INCORRECT_EXTENDED_LEN = 0x0C; 692 static final int SYNERRCD_REQ_OBJ_NOT_FOUND = 0x0E; 693 static final int SYNERRCD_TOO_MANY = 0x0F; 694 static final int SYNERRCD_DUP_OBJ_PRESENT = 0x12; 695 static final int SYNERRCD_INVALID_CORRELATOR = 0x13; 696 static final int SYNERRCD_REQ_VAL_NOT_FOUND = 0x14; 697 static final int SYNERRCD_DSS_CONT_LESS_OR_EQUAL_2 = 0x16; 698 static final int SYNERRCD_CHAIN_OFF_SAME_NEXT_CORRELATOR = 0x18; 699 static final int SYNERRCD_CHAIN_OFF_ERROR_CONTINUE = 0x1A; 700 static final int SYNERRCD_INVALID_CP_FOR_CMD = 0x1D; 701 702 static final int PRCCNVCD_OBJDSS_SENT_NOT_ALLOWED = 0x03; 703 static final int PRCCNVCD_EXCSAT_FIRST_AFTER_CONN = 0x06; 704 static final int PRCCNVCD_ACCSEC_SECCHK_WRONG_STATE = 0x11; 705 static final int PRCCNVCD_RDBNAM_MISMATCH = 0x12; 706 707 static final int SVRCOD_INFO = 0; static final int SVRCOD_WARNING = 4; static final int SVRCOD_ERROR = 8; static final int SVRCOD_SEVERE = 16; static final int SVRCOD_ACCDMG = 32; static final int SVRCOD_PRMDMG = 64; static final int SVRCOD_SESDMG = 128; 715 static final int SECMEC_DCESEC = 1; static final int SECMEC_USRIDPWD = 3; static final int SECMEC_USRIDONL = 4; static final int SECMEC_USRIDNWPWD = 5; static final int SECMEC_USRSBSPWD = 6; static final int SECMEC_USRENCPWD = 7; static final int SECMEC_USRSSBPWD = 8; static final int SECMEC_EUSRIDPWD = 9; static final int SECMEC_EUSRIDNWPWD = 10; 726 static final int SECCHKCD_OK = 0; static final int SECCHKCD_NOTSUPPORTED = 0x01; static final int SECCHKCD_SECTKNMISSING_OR_INVALID = 0x0E; static final int SECCHKCD_PASSWORDMISSING = 0x10; static final int SECCHKCD_USERIDMISSING = 0x12; static final int SECCHKCD_USERIDINVALID = 0x13; 734 static final String TYPDEFNAM_QTDSQLASC = "QTDSQLASC"; static final String TYPDEFNAM_QTDSQLJVM = "QTDSQLJVM"; static final String TYPDEFNAM_QTDSQLX86 = "QTDSQLX86"; 739 static final int MAX_NAME = 255; 741 static final int RDBNAM_LEN = 18; static final int PRDID_MAX = 8; 744 static final int RDBCOLID_LEN = 18; 745 static final int PKGID_LEN = 18; 746 static final int PKGCNSTKN_LEN = 8; 747 static final int PKGNAMCSN_LEN = RDBNAM_LEN + RDBCOLID_LEN + PKGID_LEN + 748 PKGCNSTKN_LEN + 2; 749 750 static final int QRYBLKSZ_MIN = 512; 752 static final int QRYBLKSZ_MAX = 10*1024*1024; 753 static final int QRYROWSET_MAX = 32767; 754 static final int QRYROWSET_DEFAULT = -1; 755 756 static final int QRYBLKCTL_DEFAULT = LMTBLKPRC; 758 static final int MAXBLKEXT_NONE = 0; 759 static final int MAXBLKEXT_DEFAULT = MAXBLKEXT_NONE; 760 761 static final int QRYSCRREL = 1; static final int QRYSCRABS = 2; static final int QRYSCRAFT = 3; static final int QRYSCRBEF = 4; 767 static final int OUTOVRFRS = 1; static final int OUTOVRANY = 2; 771 772 773 775 776 public static final int RLSCONV = 0x119F; 778 779 public static final int SYNCCRD = 0x1248; 781 782 public static final int XARETVAL = 0x1904; 784 785 public static final int TIMEOUT = 0x1907; 787 788 public static final int SYNCTYPE_NEW_UOW = 0x09; 790 791 public static final int SYNCTYPE_END_UOW = 0x0B; 793 794 public static final int SYNCTYPE_PREPARE = 0x01; 796 797 public static final int SYNCTYPE_MIGRATE = 0x02; 799 800 public static final int SYNCTYPE_COMMITTED = 0x03; 802 803 public static final int SYNCTYPE_REQ_COMMIT = 0x05; 805 806 public static final int SYNCTYPE_REQ_FORGET = 0x06; 808 809 public static final int SYNCTYPE_ROLLBACK = 0x04; 811 812 static final int SYNCTYPE_REQ_LOG = 0x08; 814 815 public static final int SYNCTYPE_MIGRATED = 0x0A; 817 818 public static final int SYNCTYPE_INDOUBT = 0x0C; 820 821 822 public static final int FORGET = 0x1186; 824 825 public static final int SYNCTYPE = 0x1187; 827 828 public static final int XID = 0x1801; 830 831 public static final int XAFLAGS = 0x1903; 833 834 public static final int RSYNCTYP = 0x11EA; 836 837 public static final int SYNCRRD = 0x126D; 839 840 public static final int TMNOFLAGS = 0x00000000; 842 843 844 static final int PRPHRCLST = 0x1905; 846 847 static final int XIDCNT = 0x1906; 849 850 851 853 protected static int [] MGR_CODEPOINTS = { 854 AGENT, 855 CCSIDMGR, 856 CMNAPPC, 857 CMNSYNCPT, 858 CMNTCPIP, 859 DICTIONARY, 860 RDB, 861 RSYNCMGR, 862 SECMGR, 863 SQLAM, 864 SUPERVISOR, 865 SYNCPTMGR, 866 XAMGR 867 }; 868 protected static final int UNKNOWN_MANAGER = -1; 869 870 private CodePoint () {} 872 873 878 protected static int getManagerIndex(int manager) 879 { 880 for (int i = 0; i < MGR_CODEPOINTS.length; i++) 881 if (MGR_CODEPOINTS[i] == manager) 882 return i; 883 return UNKNOWN_MANAGER; 884 } 885 890 protected static boolean isKnownManager(int manager) 891 { 892 for (int i = 0; i < CodePoint.MGR_CODEPOINTS.length; i++) 893 if (manager == CodePoint.MGR_CODEPOINTS[i]) 894 return true; 895 return false; 896 } 897 } 898 | Popular Tags |