1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 package org.melati.poem.dbms.test.sql;
46
47 import java.io.InputStream;
48 import java.io.OutputStream;
49 import java.io.Reader;
50 import java.io.Writer;
51 import java.sql.Clob;
52 import java.sql.SQLException;
53
54
55
56
57
58
59
60
61 public abstract class ThrowingClobJdbc3
62 extends Thrower
63 implements Clob {
64
65 Clob it = null;
66
67
68
69
70
71
72 public InputStream getAsciiStream() throws SQLException {
73 if (shouldThrow(this.getClass().getInterfaces()[0], "getAsciiStream"))
74 throw new SQLException("Clob bombed");
75 return it.getAsciiStream();
76 }
77
78
79
80
81
82
83 public Reader getCharacterStream() throws SQLException {
84 if (shouldThrow(this.getClass().getInterfaces()[0], "getCharacterStream"))
85 throw new SQLException("Clob bombed");
86 return it.getCharacterStream();
87 }
88
89
90
91
92
93
94 public String getSubString(long pos, int length) throws SQLException {
95 if (shouldThrow(this.getClass().getInterfaces()[0], "getSubString"))
96 throw new SQLException("Clob bombed");
97 return it.getSubString(pos, length);
98 }
99
100
101
102
103
104
105 public long length() throws SQLException {
106 if (shouldThrow(this.getClass().getInterfaces()[0], "length"))
107 throw new SQLException("Clob bombed");
108 return it.length();
109 }
110
111
112
113
114
115
116 public long position(String searchstr, long start) throws SQLException {
117 if (shouldThrow(this.getClass().getInterfaces()[0], "position"))
118 throw new SQLException("Clob bombed");
119 return it.position(searchstr, start);
120 }
121
122
123
124
125
126
127 public long position(Clob searchstr, long start) throws SQLException {
128 if (shouldThrow(this.getClass().getInterfaces()[0], "position"))
129 throw new SQLException("Clob bombed");
130 return it.position(searchstr, start);
131 }
132
133
134
135
136
137
138 public OutputStream setAsciiStream(long pos) throws SQLException {
139 if (shouldThrow(this.getClass().getInterfaces()[0], "setAsciiStream"))
140 throw new SQLException("Clob bombed");
141 return it.setAsciiStream(pos);
142 }
143
144
145
146
147
148
149 public Writer setCharacterStream(long pos) throws SQLException {
150 if (shouldThrow(this.getClass().getInterfaces()[0], "setCharacterStream"))
151 throw new SQLException("Clob bombed");
152 return it.setCharacterStream(pos);
153 }
154
155
156
157
158
159
160 public int setString(long pos, String str) throws SQLException {
161 if (shouldThrow(this.getClass().getInterfaces()[0], "setString"))
162 throw new SQLException("Clob bombed");
163 return it.setString(pos, str);
164 }
165
166
167
168
169
170
171 public int setString(long pos, String str, int offset, int len)
172 throws SQLException {
173 if (shouldThrow(this.getClass().getInterfaces()[0], "setString"))
174 throw new SQLException("Clob bombed");
175 return it.setString(pos, str, offset, len);
176 }
177
178
179
180
181
182
183 public void truncate(long len) throws SQLException {
184 if (shouldThrow(this.getClass().getInterfaces()[0], "truncate"))
185 throw new SQLException("Clob bombed");
186 it.truncate(len);
187 }
188
189 }