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