1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shardingsphere.driver.jdbc.unsupported;
19
20 import org.apache.shardingsphere.driver.jdbc.adapter.WrapperAdapter;
21 import org.apache.shardingsphere.infra.exception.generic.UnsupportedSQLOperationException;
22
23 import java.sql.Blob;
24 import java.sql.Clob;
25 import java.sql.Connection;
26 import java.sql.NClob;
27 import java.sql.SQLException;
28 import java.sql.SQLFeatureNotSupportedException;
29 import java.sql.SQLXML;
30 import java.sql.Struct;
31 import java.util.Map;
32 import java.util.Properties;
33 import java.util.concurrent.Executor;
34
35
36
37
38 public abstract class AbstractUnsupportedOperationConnection extends WrapperAdapter implements Connection {
39
40 @Override
41 public final String nativeSQL(final String sql) throws SQLException {
42 throw new SQLFeatureNotSupportedException("nativeSQL");
43 }
44
45 @Override
46 public final void abort(final Executor executor) throws SQLException {
47 throw new SQLFeatureNotSupportedException("abort");
48 }
49
50 @Override
51 public final Map<String, Class<?>> getTypeMap() throws SQLException {
52 throw new SQLFeatureNotSupportedException("getTypeMap");
53 }
54
55 @Override
56 public final void setTypeMap(final Map<String, Class<?>> map) throws SQLException {
57 throw new SQLFeatureNotSupportedException("setTypeMap");
58 }
59
60 @Override
61 public final int getNetworkTimeout() throws SQLException {
62 throw new SQLFeatureNotSupportedException("getNetworkTimeout");
63 }
64
65 @Override
66 public final void setNetworkTimeout(final Executor executor, final int milliseconds) throws SQLException {
67 throw new SQLFeatureNotSupportedException("setNetworkTimeout");
68 }
69
70 @Override
71 public final Clob createClob() throws SQLException {
72 throw new SQLFeatureNotSupportedException("createClob");
73 }
74
75 @Override
76 public final Blob createBlob() throws SQLException {
77 throw new SQLFeatureNotSupportedException("createBlob");
78 }
79
80 @Override
81 public final NClob createNClob() throws SQLException {
82 throw new SQLFeatureNotSupportedException("createNClob");
83 }
84
85 @Override
86 public final SQLXML createSQLXML() throws SQLException {
87 throw new SQLFeatureNotSupportedException("createSQLXML");
88 }
89
90 @Override
91 public final Struct createStruct(final String typeName, final Object[] attributes) throws SQLException {
92 throw new SQLFeatureNotSupportedException("createStruct");
93 }
94
95 @Override
96 public final Properties getClientInfo() throws SQLException {
97 throw new SQLFeatureNotSupportedException("getClientInfo");
98 }
99
100 @Override
101 public final String getClientInfo(final String name) throws SQLException {
102 throw new SQLFeatureNotSupportedException("getClientInfo name");
103 }
104
105 @Override
106 public final void setClientInfo(final String name, final String value) {
107 throw new UnsupportedSQLOperationException("setClientInfo name value");
108 }
109
110 @Override
111 public final void setClientInfo(final Properties props) {
112 throw new UnsupportedSQLOperationException("setClientInfo properties");
113 }
114 }