2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 package org.apache.harmony.sql.tests.java.sql;
20 import java.sql.Array;
22 import java.sql.CallableStatement;
24 import java.sql.Connection;
25 import java.sql.DatabaseMetaData;
26 import java.sql.NClob;
27 import java.sql.PreparedStatement;
28 import java.sql.SQLClientInfoException;
29 import java.sql.SQLException;
30 import java.sql.SQLWarning;
31 import java.sql.SQLXML;
32 import java.sql.Savepoint;
33 import java.sql.Statement;
34 import java.sql.Struct;
36 import java.util.Properties;
39 * Helper class for the java.sql tests - a skeleton class which implements the
40 * java.sql.Connection interface
43 public class TestHelper_Connection1 implements Connection {
44 public void clearWarnings() throws SQLException {
47 public void close() throws SQLException {
50 public void commit() throws SQLException {
53 public Statement createStatement() throws SQLException {
57 public Statement createStatement(int resultSetType,
58 int resultSetConcurrency, int resultSetHoldability)
63 public Statement createStatement(int resultSetType, int resultSetConcurrency)
68 public boolean getAutoCommit() throws SQLException {
72 public String getCatalog() throws SQLException {
76 public int getHoldability() throws SQLException {
80 public DatabaseMetaData getMetaData() throws SQLException {
84 public int getTransactionIsolation() throws SQLException {
88 public Map<String, Class<?>> getTypeMap() throws SQLException {
92 public SQLWarning getWarnings() throws SQLException {
96 public boolean isClosed() throws SQLException {
100 public boolean isReadOnly() throws SQLException {
104 public String nativeSQL(String sql) throws SQLException {
108 public CallableStatement prepareCall(String sql, int resultSetType,
109 int resultSetConcurrency, int resultSetHoldability)
110 throws SQLException {
114 public CallableStatement prepareCall(String sql, int resultSetType,
115 int resultSetConcurrency) throws SQLException {
119 public CallableStatement prepareCall(String sql) throws SQLException {
123 public PreparedStatement prepareStatement(String sql, int resultSetType,
124 int resultSetConcurrency, int resultSetHoldability)
125 throws SQLException {
129 public PreparedStatement prepareStatement(String sql, int resultSetType,
130 int resultSetConcurrency) throws SQLException {
134 public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
135 throws SQLException {
139 public PreparedStatement prepareStatement(String sql, int[] columnIndexes)
140 throws SQLException {
144 public PreparedStatement prepareStatement(String sql, String[] columnNames)
145 throws SQLException {
149 public PreparedStatement prepareStatement(String sql) throws SQLException {
153 public void releaseSavepoint(Savepoint savepoint) throws SQLException {
156 public void rollback() throws SQLException {
159 public void rollback(Savepoint savepoint) throws SQLException {
162 public void setAutoCommit(boolean autoCommit) throws SQLException {
165 public void setCatalog(String catalog) throws SQLException {
168 public void setHoldability(int holdability) throws SQLException {
171 public void setReadOnly(boolean readOnly) throws SQLException {
174 public Savepoint setSavepoint() throws SQLException {
178 public Savepoint setSavepoint(String name) throws SQLException {
182 public void setTransactionIsolation(int level) throws SQLException {
185 public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
188 public boolean isWrapperFor(Class<?> iface) throws SQLException {
192 public <T> T unwrap(Class<T> iface) throws SQLException {
196 public Array createArrayOf(String typeName, Object[] elements)
197 throws SQLException {
201 public Blob createBlob() throws SQLException {
205 public Clob createClob() throws SQLException {
209 public NClob createNClob() throws SQLException {
213 public SQLXML createSQLXML() throws SQLException {
217 public Struct createStruct(String typeName, Object[] attributes)
218 throws SQLException {
222 public String getClientInfo(String name) throws SQLException {
226 public Properties getClientInfo() throws SQLException {
230 public boolean isValid(int timeout) throws SQLException {
234 public void setClientInfo(String name, String value)
235 throws SQLClientInfoException {
239 public void setClientInfo(Properties properties)
240 throws SQLClientInfoException {