KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > internetcds > jdbc > tds > Connection_2_0


1 //
2
// Copyright 1999 Craig Spannring
3
//
4
// All rights reserved.
5
//
6
// Redistribution and use in source and binary forms, with or without
7
// modification, are permitted provided that the following conditions are met:
8
// 1. Redistributions of source code must retain the above copyright
9
// notice, this list of conditions and the following disclaimer.
10
// 2. Redistributions in binary form must reproduce the above copyright
11
// notice, this list of conditions and the following disclaimer in the
12
// documentation and/or other materials provided with the distribution.
13
// 3. All advertising materials mentioning features or use of this software
14
// must display the following acknowledgement:
15
// This product includes software developed by Craig Spannring
16
// 4. The name of Craig Spannring may not be used to endorse or promote
17
// products derived from this software without specific prior
18
// written permission.
19
//
20
// THIS SOFTWARE IS PROVIDED BY CRAIG SPANNRING ``AS IS'' AND
21
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
// ARE DISCLAIMED. IN NO EVENT SHALL CRAIG SPANNRING BE LIABLE
24
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30
// SUCH DAMAGE.
31
//
32

33 package com.internetcds.jdbc.tds;
34
35 import java.sql.*;
36 import java.util.Properties JavaDoc;
37 import java.util.Vector JavaDoc;
38
39
40 public class Connection_2_0
41    extends com.internetcds.jdbc.tds.Connection_base
42    implements java.sql.Connection JavaDoc
43 {
44    public static final String JavaDoc cvsVersion = "$Id: Connection_2_0.java,v 1.1 2006/06/23 10:39:04 sinisa Exp $";
45
46
47
48
49    public Connection_2_0(
50       java.util.Properties JavaDoc props_)
51       throws java.sql.SQLException JavaDoc, com.internetcds.jdbc.tds.TdsException
52       {
53           super(props_);
54       }
55
56
57     /**
58      * JDBC 2.0
59      *
60      * Gets the type map object associated with this connection.
61      * Unless the application has added an entry to the type map,
62      * the map returned will be empty.
63      *
64      * @return the <code>java.util.Map</code> object associated
65      * with this <code>Connection</code> object
66      */

67    public java.util.Map JavaDoc getTypeMap() throws SQLException
68       {
69          NotImplemented();
70          return null;
71       }
72
73
74     /**
75      * JDBC 2.0
76      *
77      * Installs the given type map as the type map for
78      * this connection. The type map will be used for the
79      * custom mapping of SQL structured types and distinct types.
80      *
81      * @param the <code>java.util.Map</code> object to install
82      * as the replacement for this <code>Connection</code>
83      * object's default type map
84      */

85    public void setTypeMap(java.util.Map JavaDoc map) throws SQLException
86       {
87          NotImplemented();
88       }
89       
90
91     //--------------------------JDBC 3.0-----------------------------
92
/**
93      * Changes the holdability of <code>ResultSet</code> objects
94      * created using this <code>Connection</code> object to the given
95      * holdability.
96      *
97      * @param holdability a <code>ResultSet</code> holdability constant; one of
98      * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
99      * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
100      * @throws SQLException if a database access occurs, the given parameter
101      * is not a <code>ResultSet</code> constant indicating holdability,
102      * or the given holdability is not supported
103      * @since 1.4
104      * @see #getHoldability
105      * @see java.sql.ResultSet
106      */

107     public void setHoldability(int holdability) throws SQLException {
108         throw new UnsupportedOperationException JavaDoc("Connection.setHoldability(int) unsupported");
109     }
110
111     /**
112      * Retrieves the current holdability of ResultSet objects created
113      * using this Connection object.
114      *
115      * @return the holdability, one of <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
116      * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
117      * @throws SQLException if a database access occurs
118      * @since 1.4
119      * @see #setHoldability
120      * @see java.sql.ResultSet
121      */

122     public int getHoldability() throws SQLException {
123         throw new UnsupportedOperationException JavaDoc("Connection.getHoldability() unsupported");
124     }
125
126 // Removed since this only builds under JDK 1.4
127
public Savepoint setSavepoint() throws SQLException {
128         throw new UnsupportedOperationException JavaDoc("Connection.setSavepoint() unsupported");
129     }
130
131     public Savepoint setSavepoint(String JavaDoc name) throws SQLException {
132         throw new UnsupportedOperationException JavaDoc("Connection.setSavepoint(String) unsupported");
133     }
134
135     public void rollback(Savepoint savepoint) throws SQLException {
136         throw new UnsupportedOperationException JavaDoc("Connection.rollback(Savepoint) unsupported");
137     }
138
139     public void releaseSavepoint(Savepoint savepoint) throws SQLException {
140         throw new UnsupportedOperationException JavaDoc("Connection.releaseSavepoint(Savepoint) unsupported");
141     }
142      
143
144     public java.sql.Statement JavaDoc createStatement(int resultSetType,
145                                      int resultSetConcurrency,
146                                      int resultSetHoldability) throws SQLException {
147         throw new UnsupportedOperationException JavaDoc("Connection.createStatement(int,int,int) unsupported");
148     }
149
150     public PreparedStatement prepareStatement(String JavaDoc sql,
151                                       int resultSetType,
152                                       int resultSetConcurrency,
153                                       int resultSetHoldability) throws SQLException {
154         throw new UnsupportedOperationException JavaDoc("Connection.prepareStatement(String,int,int,int) unsupported");
155     }
156
157     public CallableStatement prepareCall(String JavaDoc sql,
158                                          int resultSetType,
159                                          int resultSetConcurrency,
160                                          int resultSetHoldability) throws SQLException {
161         throw new UnsupportedOperationException JavaDoc("Connection.prepareCall(String,int,int,int) unsupported");
162     }
163
164     public PreparedStatement prepareStatement(String JavaDoc sql, int autoGeneratedKeys) throws SQLException {
165         throw new UnsupportedOperationException JavaDoc("Connection.prepareStatement(String,int) unsupported");
166     }
167
168     public PreparedStatement prepareStatement(String JavaDoc sql, int[] columnIndexes) throws SQLException {
169         throw new UnsupportedOperationException JavaDoc("Connection.prepareStatement(String,int[]) unsupported");
170     }
171
172     public PreparedStatement prepareStatement(String JavaDoc sql, String JavaDoc[] columnNames) throws SQLException {
173         throw new UnsupportedOperationException JavaDoc("Connection.prepareStatement(String,String[]) unsupported");
174     }
175       
176 }
177
Popular Tags