KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > shared > common > reference > JDBC40Translation


1 /*
2
3    Derby - Class org.apache.derby.shared.common.reference.JDBC40Translation
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.shared.common.reference;
23
24 /**
25         This class contains public statics that map directly to the
26         new public statics in the jdbc 4.0 interfaces. By providing
27         an intermediary class with hard-coded copies of constants that
28         will be available in jdbc 4.0, it becomes possible to refer to
29         these constants when compiling against older jdk versions.
30
31         <P>The test <code>jdbc4/JDBC40TranslationTest.junit</code>,
32         which is compiled against jdk16, contains tests that verifies
33         that these hard coded constants are in fact equal to those
34         found in jdk16.
35
36         <P>
37         This class should not be shipped with the product.
38
39         <P>
40         This class has no methods, all it contains are constants
41         are public, static and final since they are declared in an interface.
42 */

43
44 public interface JDBC40Translation {
45     /*
46     ** public statics from 4.0 version of java.sql.DatabaseMetaData
47     */

48     public static final int FUNCTION_PARAMETER_UNKNOWN = 0;
49     public static final int FUNCTION_PARAMETER_IN = 1;
50     public static final int FUNCTION_PARAMETER_INOUT = 2;
51     public static final int FUNCTION_PARAMETER_OUT = 3;
52     public static final int FUNCTION_RETURN = 4;
53     
54     public static final int FUNCTION_NO_NULLS = 0;
55     public static final int FUNCTION_NULLABLE = 1;
56     public static final int FUNCTION_NULLABLE_UNKNOWN = 2;
57
58     // constants from java.sql.Types
59
public static final int NCHAR = -15;
60     public static final int NVARCHAR = -9;
61     public static final int LONGNVARCHAR = -16;
62     public static final int NCLOB = 2011;
63     public static final int ROWID = -8;
64     public static final int SQLXML = 2009;
65 }
66
Popular Tags