KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > client > net > CodePointNameTable


1 /*
2
3    Derby - Class org.apache.derby.client.net.CodePointNameTable
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (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 JavaDoc {
31     CodePointNameTable() {
32         put(new Integer JavaDoc(CodePoint.ACCSECRD), "ACCSECRD");
33         put(new Integer JavaDoc(CodePoint.TYPDEFNAM), "TYPDEFNAM");
34         put(new Integer JavaDoc(CodePoint.TYPDEFOVR), "TYPDEFOVR");
35         put(new Integer JavaDoc(CodePoint.EXCSAT), "EXCSAT");
36         put(new Integer JavaDoc(CodePoint.SYNCCTL), "SYNCCTL");
37         put(new Integer JavaDoc(CodePoint.SYNCCRD), "SYNCCRD");
38         put(new Integer JavaDoc(CodePoint.SYNCRSY), "SYNCRSY");
39         put(new Integer JavaDoc(CodePoint.ACCSEC), "ACCSEC");
40         put(new Integer JavaDoc(CodePoint.SECCHK), "SECCHK");
41         put(new Integer JavaDoc(CodePoint.MGRLVLRM), "MGRLVLRM");
42         put(new Integer JavaDoc(CodePoint.SECCHKRM), "SECCHKRM");
43         put(new Integer JavaDoc(CodePoint.CMDNSPRM), "CMDNSPRM");
44         put(new Integer JavaDoc(CodePoint.OBJNSPRM), "OBJNSPRM");
45         put(new Integer JavaDoc(CodePoint.CMDCHKRM), "CMDCHKRM");
46         put(new Integer JavaDoc(CodePoint.SYNTAXRM), "SYNTAXRM");
47         put(new Integer JavaDoc(CodePoint.VALNSPRM), "VALNSPRM");
48         put(new Integer JavaDoc(CodePoint.EXCSATRD), "EXCSATRD");
49         put(new Integer JavaDoc(CodePoint.ACCRDB), "ACCRDB");
50         put(new Integer JavaDoc(CodePoint.CLSQRY), "CLSQRY");
51         put(new Integer JavaDoc(CodePoint.CNTQRY), "CNTQRY");
52         put(new Integer JavaDoc(CodePoint.DSCSQLSTT), "DSCSQLSTT");
53         put(new Integer JavaDoc(CodePoint.EXCSQLIMM), "EXCSQLIMM");
54         put(new Integer JavaDoc(CodePoint.EXCSQLSTT), "EXCSQLSTT");
55         put(new Integer JavaDoc(CodePoint.OPNQRY), "OPNQRY");
56         put(new Integer JavaDoc(CodePoint.PRPSQLSTT), "PRPSQLSTT");
57         put(new Integer JavaDoc(CodePoint.RDBCMM), "RDBCMM");
58         put(new Integer JavaDoc(CodePoint.RDBRLLBCK), "RDBRLLBCK");
59         put(new Integer JavaDoc(CodePoint.DSCRDBTBL), "DSCRDBTBL");
60         put(new Integer JavaDoc(CodePoint.ACCRDBRM), "ACCRDBRM");
61         put(new Integer JavaDoc(CodePoint.QRYNOPRM), "QRYNOPRM");
62         put(new Integer JavaDoc(CodePoint.RDBATHRM), "RDBATHRM");
63         put(new Integer JavaDoc(CodePoint.RDBNACRM), "RDBNACRM");
64         put(new Integer JavaDoc(CodePoint.OPNQRYRM), "OPNQRYRM");
65         put(new Integer JavaDoc(CodePoint.RDBACCRM), "RDBACCRM");
66         put(new Integer JavaDoc(CodePoint.ENDQRYRM), "ENDQRYRM");
67         put(new Integer JavaDoc(CodePoint.ENDUOWRM), "ENDUOWRM");
68         put(new Integer JavaDoc(CodePoint.ABNUOWRM), "ABNUOWRM");
69         put(new Integer JavaDoc(CodePoint.DTAMCHRM), "DTAMCHRM");
70         put(new Integer JavaDoc(CodePoint.QRYPOPRM), "QRYPOPRM");
71         put(new Integer JavaDoc(CodePoint.RDBNFNRM), "RDBNFNRM");
72         put(new Integer JavaDoc(CodePoint.OPNQFLRM), "OPNQFLRM");
73         put(new Integer JavaDoc(CodePoint.SQLERRRM), "SQLERRRM");
74         put(new Integer JavaDoc(CodePoint.RDBUPDRM), "RDBUPDRM");
75         put(new Integer JavaDoc(CodePoint.RSLSETRM), "RSLSETRM");
76         put(new Integer JavaDoc(CodePoint.RDBAFLRM), "RDBAFLRM");
77         put(new Integer JavaDoc(CodePoint.SQLCARD), "SQLCARD");
78         put(new Integer JavaDoc(CodePoint.SQLDARD), "SQLDARD");
79         put(new Integer JavaDoc(CodePoint.SQLDTA), "SQLDTA");
80         put(new Integer JavaDoc(CodePoint.SQLDTARD), "SQLDTARD");
81         put(new Integer JavaDoc(CodePoint.SQLSTT), "SQLSTT");
82         put(new Integer JavaDoc(CodePoint.QRYDSC), "QRYDSC");
83         put(new Integer JavaDoc(CodePoint.QRYDTA), "QRYDTA");
84         put(new Integer JavaDoc(CodePoint.PRCCNVRM), "PRCCNVRM");
85         put(new Integer JavaDoc(CodePoint.EXCSQLSET), "EXCSQLSET");
86         put(new Integer JavaDoc(CodePoint.EXTDTA), "EXTDTA");
87     }
88
89     String JavaDoc lookup(int codePoint) {
90         return (String JavaDoc) get(new Integer JavaDoc(codePoint));
91     }
92 }
93
Popular Tags