1 | /* |
2 | |
3 | Derby - Class org.apache.derby.client.net.CodePointNameTable |
4 | |
5 | Copyright (c) 2001, 2005 The Apache Software Foundation or its licensors, where applicable. |
6 | |
7 | Licensed under the Apache License, Version 2.0 (the "License"); |
8 | you may not use this file except in compliance with the License. |
9 | You may obtain a copy of the License at |
10 | |
11 | http://www.apache.org/licenses/LICENSE-2.0 |
12 | |
13 | Unless required by applicable law or agreed to in writing, software |
14 | distributed under the License is distributed on an "AS IS" BASIS, |
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | See the License for the specific language governing permissions and |
17 | limitations under the License. |
18 | |
19 | */ |
20 | |
21 | package org.apache.derby.client.net; |
22 | |
23 | // This mapping is used by DssTrace only. |
24 | // This is not part of the driver and is not initialized unless dss tracing is enabled. |
25 | // This is an abstract mapping from 2-byte code point to a string representing the name of the code point. |
26 | // This data type may be modified for performance to adapt to any sort of lookup implementation, |
27 | // such as binary search on an underlying sorted array. |
28 | |
29 | class CodePointNameTable extends java.util.Hashtable { |
30 | CodePointNameTable() { |
31 | put(new Integer(CodePoint.ACCSECRD), "ACCSECRD"); |
32 | put(new Integer(CodePoint.TYPDEFNAM), "TYPDEFNAM"); |
33 | put(new Integer(CodePoint.TYPDEFOVR), "TYPDEFOVR"); |
34 | put(new Integer(CodePoint.EXCSAT), "EXCSAT"); |
35 | put(new Integer(CodePoint.SYNCCTL), "SYNCCTL"); |
36 | put(new Integer(CodePoint.SYNCCRD), "SYNCCRD"); |
37 | put(new Integer(CodePoint.SYNCRSY), "SYNCRSY"); |
38 | put(new Integer(CodePoint.ACCSEC), "ACCSEC"); |
39 | put(new Integer(CodePoint.SECCHK), "SECCHK"); |
40 | put(new Integer(CodePoint.MGRLVLRM), "MGRLVLRM"); |
41 | put(new Integer(CodePoint.SECCHKRM), "SECCHKRM"); |
42 | put(new Integer(CodePoint.CMDNSPRM), "CMDNSPRM"); |
43 | put(new Integer(CodePoint.OBJNSPRM), "OBJNSPRM"); |
44 | put(new Integer(CodePoint.CMDCHKRM), "CMDCHKRM"); |
45 | put(new Integer(CodePoint.SYNTAXRM), "SYNTAXRM"); |
46 | put(new Integer(CodePoint.VALNSPRM), "VALNSPRM"); |
47 | put(new Integer(CodePoint.EXCSATRD), "EXCSATRD"); |
48 | put(new Integer(CodePoint.ACCRDB), "ACCRDB"); |
49 | put(new Integer(CodePoint.CLSQRY), "CLSQRY"); |
50 | put(new Integer(CodePoint.CNTQRY), "CNTQRY"); |
51 | put(new Integer(CodePoint.DSCSQLSTT), "DSCSQLSTT"); |
52 | put(new Integer(CodePoint.EXCSQLIMM), "EXCSQLIMM"); |
53 | put(new Integer(CodePoint.EXCSQLSTT), "EXCSQLSTT"); |
54 | put(new Integer(CodePoint.OPNQRY), "OPNQRY"); |
55 | put(new Integer(CodePoint.PRPSQLSTT), "PRPSQLSTT"); |
56 | put(new Integer(CodePoint.RDBCMM), "RDBCMM"); |
57 | put(new Integer(CodePoint.RDBRLLBCK), "RDBRLLBCK"); |
58 | put(new Integer(CodePoint.DSCRDBTBL), "DSCRDBTBL"); |
59 | put(new Integer(CodePoint.ACCRDBRM), "ACCRDBRM"); |
60 | put(new Integer(CodePoint.QRYNOPRM), "QRYNOPRM"); |
61 | put(new Integer(CodePoint.RDBATHRM), "RDBATHRM"); |
62 | put(new Integer(CodePoint.RDBNACRM), "RDBNACRM"); |
63 | put(new Integer(CodePoint.OPNQRYRM), "OPNQRYRM"); |
64 | put(new Integer(CodePoint.RDBACCRM), "RDBACCRM"); |
65 | put(new Integer(CodePoint.ENDQRYRM), "ENDQRYRM"); |
66 | put(new Integer(CodePoint.ENDUOWRM), "ENDUOWRM"); |
67 | put(new Integer(CodePoint.ABNUOWRM), "ABNUOWRM"); |
68 | put(new Integer(CodePoint.DTAMCHRM), "DTAMCHRM"); |
69 | put(new Integer(CodePoint.QRYPOPRM), "QRYPOPRM"); |
70 | put(new Integer(CodePoint.RDBNFNRM), "RDBNFNRM"); |
71 | put(new Integer(CodePoint.OPNQFLRM), "OPNQFLRM"); |
72 | put(new Integer(CodePoint.SQLERRRM), "SQLERRRM"); |
73 | put(new Integer(CodePoint.RDBUPDRM), "RDBUPDRM"); |
74 | put(new Integer(CodePoint.RSLSETRM), "RSLSETRM"); |
75 | put(new Integer(CodePoint.RDBAFLRM), "RDBAFLRM"); |
76 | put(new Integer(CodePoint.SQLCARD), "SQLCARD"); |
77 | put(new Integer(CodePoint.SQLDARD), "SQLDARD"); |
78 | put(new Integer(CodePoint.SQLDTA), "SQLDTA"); |
79 | put(new Integer(CodePoint.SQLDTARD), "SQLDTARD"); |
80 | put(new Integer(CodePoint.SQLSTT), "SQLSTT"); |
81 | put(new Integer(CodePoint.QRYDSC), "QRYDSC"); |
82 | put(new Integer(CodePoint.QRYDTA), "QRYDTA"); |
83 | put(new Integer(CodePoint.PRCCNVRM), "PRCCNVRM"); |
84 | put(new Integer(CodePoint.EXCSQLSET), "EXCSQLSET"); |
85 | put(new Integer(CodePoint.EXTDTA), "EXTDTA"); |
86 | } |
87 | |
88 | String lookup(int codePoint) { |
89 | return (String) get(new Integer(codePoint)); |
90 | } |
91 | } |