KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > client > am > SqlState


1 /*
2
3    Derby - Class org.apache.derby.client.am.SqlState
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.am;
23
24 // This class is for strong-typing.
25
//
26
// Unless otherwise architected by PROTOCOL, all client-side generated SQL States should be
27
// Dnc architected codes in the range "46600" to "466ZZ".
28
//
29
// In general SQL states are architected by the product that issues them.
30
// Therefore Dnc will not attempt to reuse pre-existing sql states
31
// Range for dnc architected sql codes is +/- 4400 to 4499.
32
//
33

34 public class SqlState {
35     private String JavaDoc state_;
36
37     private SqlState(String JavaDoc state) {
38         state_ = state;
39     }
40
41     String JavaDoc getState() {
42         return state_;
43     }
44
45     // The following codes are architected by PROTOCOL on page 331 of PROTOCOL V2 Volume 1.
46
// SQL States generated by Dnc should be Dnc-specific with the following specific exctpions.
47
//
48
public final static SqlState _08004 = new SqlState("08004");
49     public final static SqlState _58009 = new SqlState("58009");
50     public final static SqlState _58010 = new SqlState("58010");
51     public final static SqlState _58014 = new SqlState("58014");
52     public final static SqlState _58015 = new SqlState("58015");
53     public final static SqlState _58016 = new SqlState("58016");
54     public final static SqlState _58017 = new SqlState("58017");
55     public final static SqlState _24501 = new SqlState("24501");
56     public final static SqlState _58008 = new SqlState("58008");
57     public final static SqlState _22021 = new SqlState("22021");
58     public final static SqlState _2D521 = new SqlState("2D521");
59
60     // Dnc-archited sql states follow
61
//
62
public final static SqlState undefined = new SqlState(null);
63 }
64
Popular Tags