1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  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,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 package org.apache.openoffice.comp.sdbc.dbtools.util;
23 
24 public enum StandardSQLState {
25     SQL_WRONG_PARAMETER_NUMBER("07001"),
26     SQL_INVALID_DESCRIPTOR_INDEX("07009"),
27     SQL_UNABLE_TO_CONNECT("08001"),
28     SQL_NUMERIC_OUT_OF_RANGE("22003"),
29     SQL_INVALID_DATE_TIME("22007"),
30     SQL_INVALID_CURSOR_STATE("24000"),
31     SQL_TABLE_OR_VIEW_EXISTS("42S01"),
32     SQL_TABLE_OR_VIEW_NOT_FOUND("42S02"),
33     SQL_INDEX_EXISTS("42S11"),
34     SQL_INDEX_NOT_FOUND("42S12"),
35     SQL_COLUMN_EXISTS("42S21"),
36     SQL_COLUMN_NOT_FOUND("42S22"),
37     SQL_GENERAL_ERROR("HY000"),
38     SQL_INVALID_SQL_DATA_TYPE("HY004"),
39     SQL_OPERATION_CANCELED("HY008"),
40     SQL_FUNCTION_SEQUENCE_ERROR("HY010"),
41     SQL_INVALID_CURSOR_POSITION("HY109"),
42     SQL_INVALID_BOOKMARK_VALUE("HY111"),
43     SQL_FEATURE_NOT_IMPLEMENTED("HYC00"),
44     SQL_FUNCTION_NOT_SUPPORTED("IM001"),
45     SQL_CONNECTION_DOES_NOT_EXIST("08003"),
46     SQL_ERROR_UNSPECIFIED("");
47 
48 
49     private String text;
50 
StandardSQLState(String text)51     private StandardSQLState(String text) {
52         this.text = text;
53     }
54 
text()55     public String text() {
56         return text;
57     }
58 }
59