KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdbc > sql > conv > DummyPreparedStmt


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdbc.sql.conv;
13
14 import java.sql.*;
15 import java.io.Reader JavaDoc;
16 import java.io.InputStream JavaDoc;
17 import java.util.Calendar JavaDoc;
18 import java.net.URL JavaDoc;
19 import java.math.BigDecimal JavaDoc;
20
21 /**
22  * This PreparedStatement is used to capture the conversion done by a converter.
23  */

24 public class DummyPreparedStmt implements PreparedStatement {
25
26     public String JavaDoc value;
27     public boolean toQuote = false;
28
29     public DummyPreparedStmt() {
30     }
31
32     public void setFloat(int parameterIndex, float x) throws SQLException {
33         value = String.valueOf(x);
34     }
35
36     public void setDouble(int parameterIndex, double x) throws SQLException {
37         value = String.valueOf(x);
38     }
39
40     public void setRef(int i, Ref x) throws SQLException {
41         //To change body of implemented methods use Options | File Templates.
42
}
43
44     public void setBoolean(int parameterIndex, boolean x) throws SQLException {
45         value = String.valueOf(x);
46     }
47
48     public void setString(int parameterIndex, String JavaDoc x) throws SQLException {
49         value = String.valueOf(x);
50         toQuote = true;
51     }
52
53
54
55     public void setLong(int parameterIndex, long x) throws SQLException
56     {
57         value = String.valueOf(x);
58     }
59
60     public void setShort(int parameterIndex, short x) throws SQLException {
61         value = String.valueOf(x);
62     }
63
64     public void setDate(int parameterIndex, Date x) throws SQLException {
65         value = String.valueOf(x);
66     }
67
68     public void setDate(int parameterIndex, Date x, Calendar JavaDoc cal) throws SQLException {
69         value = String.valueOf(x);
70     }
71
72     public void setInt(int parameterIndex, int x) throws SQLException {
73         value = String.valueOf(x);
74     }
75
76     public void setByte(int parameterIndex, byte x) throws SQLException {
77         value = String.valueOf(x);
78     }
79
80     public void setCharacterStream(int parameterIndex, Reader JavaDoc reader, int length) throws SQLException {
81         //To change body of implemented methods use Options | File Templates.
82
}
83
84     public void setBlob(int i, Blob x) throws SQLException {
85         //To change body of implemented methods use Options | File Templates.
86
}
87
88     public void setBinaryStream(int parameterIndex, InputStream JavaDoc x, int length) throws SQLException {
89         //To change body of implemented methods use Options | File Templates.
90
}
91
92     public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
93         //To change body of implemented methods use Options | File Templates.
94
}
95     
96     
97
98     public void setTimestamp(int parameterIndex, Timestamp x, Calendar JavaDoc cal) throws SQLException {
99         //To change body of implemented methods use Options | File Templates.
100
}
101
102     public void setBytes(int parameterIndex, byte x[]) throws SQLException {
103         //To change body of implemented methods use Options | File Templates.
104
}
105
106     public void setClob(int i, Clob x) throws SQLException {
107         //To change body of implemented methods use Options | File Templates.
108
}
109
110     public void setAsciiStream(int parameterIndex, InputStream JavaDoc x, int length) throws SQLException {
111         //To change body of implemented methods use Options | File Templates.
112
}
113
114     public void setURL(int parameterIndex, URL JavaDoc x) throws SQLException {
115         //To change body of implemented methods use Options | File Templates.
116
}
117
118     public void setArray(int i, Array x) throws SQLException {
119         //To change body of implemented methods use Options | File Templates.
120
}
121
122     public void setObject(int parameterIndex, Object JavaDoc x, int targetSqlType) throws SQLException {
123         //To change body of implemented methods use Options | File Templates.
124
}
125
126     public void setObject(int parameterIndex, Object JavaDoc x, int targetSqlType, int scale) throws SQLException {
127         //To change body of implemented methods use Options | File Templates.
128
}
129
130     public void setBigDecimal(int parameterIndex, BigDecimal JavaDoc x) throws SQLException {
131         //To change body of implemented methods use Options | File Templates.
132
}
133
134     public void setUnicodeStream(int parameterIndex, InputStream JavaDoc x, int length) throws SQLException {
135         //To change body of implemented methods use Options | File Templates.
136
}
137
138     public void setTime(int parameterIndex, Time x) throws SQLException {
139         //To change body of implemented methods use Options | File Templates.
140
}
141
142     public void setTime(int parameterIndex, Time x, Calendar JavaDoc cal) throws SQLException {
143         //To change body of implemented methods use Options | File Templates.
144
}
145
146
147
148
149
150
151
152
153
154
155
156     public ResultSet executeQuery() throws SQLException {
157         return null; //To change body of implemented methods use Options | File Templates.
158
}
159
160     public int executeUpdate() throws SQLException {
161         return 0; //To change body of implemented methods use Options | File Templates.
162
}
163
164     public void clearParameters() throws SQLException {
165         //To change body of implemented methods use Options | File Templates.
166
}
167
168     public void addBatch() throws SQLException {
169         //To change body of implemented methods use Options | File Templates.
170
}
171
172     public void setNull(int parameterIndex, int sqlType) throws SQLException {
173         //To change body of implemented methods use Options | File Templates.
174
}
175
176     public void setNull(int paramIndex, int sqlType, String JavaDoc typeName) throws SQLException {
177         //To change body of implemented methods use Options | File Templates.
178
}
179
180     public ParameterMetaData getParameterMetaData() throws SQLException {
181         return null; //To change body of implemented methods use Options | File Templates.
182
}
183
184     public ResultSetMetaData getMetaData() throws SQLException {
185         return null; //To change body of implemented methods use Options | File Templates.
186
}
187
188     public boolean execute() throws SQLException {
189         return false; //To change body of implemented methods use Options | File Templates.
190
}
191
192     public void setObject(int parameterIndex, Object JavaDoc x) throws SQLException {
193         //To change body of implemented methods use Options | File Templates.
194
}
195
196     public void setQueryTimeout(int seconds) throws SQLException {
197         //To change body of implemented methods use Options | File Templates.
198
}
199
200     public void setCursorName(String JavaDoc name) throws SQLException {
201         //To change body of implemented methods use Options | File Templates.
202
}
203
204     public int getFetchSize() throws SQLException {
205         return 0; //To change body of implemented methods use Options | File Templates.
206
}
207
208     public int getUpdateCount() throws SQLException {
209         return 0; //To change body of implemented methods use Options | File Templates.
210
}
211
212     public ResultSet getGeneratedKeys() throws SQLException {
213         return null; //To change body of implemented methods use Options | File Templates.
214
}
215
216     public ResultSet executeQuery(String JavaDoc sql) throws SQLException {
217         return null; //To change body of implemented methods use Options | File Templates.
218
}
219
220     public Connection getConnection() throws SQLException {
221         return null; //To change body of implemented methods use Options | File Templates.
222
}
223
224     public void cancel() throws SQLException {
225         //To change body of implemented methods use Options | File Templates.
226
}
227
228     public void setMaxFieldSize(int max) throws SQLException {
229         //To change body of implemented methods use Options | File Templates.
230
}
231
232     public void setEscapeProcessing(boolean enable) throws SQLException {
233         //To change body of implemented methods use Options | File Templates.
234
}
235
236     public void setMaxRows(int max) throws SQLException {
237         //To change body of implemented methods use Options | File Templates.
238
}
239
240     public SQLWarning getWarnings() throws SQLException {
241         return null; //To change body of implemented methods use Options | File Templates.
242
}
243
244     public int getResultSetConcurrency() throws SQLException {
245         return 0; //To change body of implemented methods use Options | File Templates.
246
}
247
248     public int executeUpdate(String JavaDoc sql) throws SQLException {
249         return 0; //To change body of implemented methods use Options | File Templates.
250
}
251
252     public int executeUpdate(String JavaDoc sql, int autoGeneratedKeys) throws SQLException {
253         return 0; //To change body of implemented methods use Options | File Templates.
254
}
255
256     public int executeUpdate(String JavaDoc sql, int columnIndexes[]) throws SQLException {
257         return 0; //To change body of implemented methods use Options | File Templates.
258
}
259
260     public int executeUpdate(String JavaDoc sql, String JavaDoc columnNames[]) throws SQLException {
261         return 0; //To change body of implemented methods use Options | File Templates.
262
}
263
264     public int getFetchDirection() throws SQLException {
265         return 0; //To change body of implemented methods use Options | File Templates.
266
}
267
268     public void setFetchDirection(int direction) throws SQLException {
269         //To change body of implemented methods use Options | File Templates.
270
}
271
272     public int getQueryTimeout() throws SQLException {
273         return 0; //To change body of implemented methods use Options | File Templates.
274
}
275
276     public int getResultSetType() throws SQLException {
277         return 0; //To change body of implemented methods use Options | File Templates.
278
}
279
280     public void clearWarnings() throws SQLException {
281         //To change body of implemented methods use Options | File Templates.
282
}
283
284     public void addBatch(String JavaDoc sql) throws SQLException {
285         //To change body of implemented methods use Options | File Templates.
286
}
287
288     public void close() throws SQLException {
289         //To change body of implemented methods use Options | File Templates.
290
}
291
292     public int getMaxFieldSize() throws SQLException {
293         return 0; //To change body of implemented methods use Options | File Templates.
294
}
295
296     public void clearBatch() throws SQLException {
297         //To change body of implemented methods use Options | File Templates.
298
}
299
300     public boolean getMoreResults() throws SQLException {
301         return false; //To change body of implemented methods use Options | File Templates.
302
}
303
304     public boolean getMoreResults(int current) throws SQLException {
305         return false; //To change body of implemented methods use Options | File Templates.
306
}
307
308     public int getMaxRows() throws SQLException {
309         return 0; //To change body of implemented methods use Options | File Templates.
310
}
311
312     public boolean execute(String JavaDoc sql) throws SQLException {
313         return false; //To change body of implemented methods use Options | File Templates.
314
}
315
316     public boolean execute(String JavaDoc sql, int autoGeneratedKeys) throws SQLException {
317         return false; //To change body of implemented methods use Options | File Templates.
318
}
319
320     public boolean execute(String JavaDoc sql, int columnIndexes[]) throws SQLException {
321         return false; //To change body of implemented methods use Options | File Templates.
322
}
323
324     public boolean execute(String JavaDoc sql, String JavaDoc columnNames[]) throws SQLException {
325         return false; //To change body of implemented methods use Options | File Templates.
326
}
327
328     public void setFetchSize(int rows) throws SQLException {
329         //To change body of implemented methods use Options | File Templates.
330
}
331
332     public ResultSet getResultSet() throws SQLException {
333         return null; //To change body of implemented methods use Options | File Templates.
334
}
335
336     public int[] executeBatch() throws SQLException {
337         return new int[0]; //To change body of implemented methods use Options | File Templates.
338
}
339
340     public int getResultSetHoldability() throws SQLException {
341         return 0; //To change body of implemented methods use Options | File Templates.
342
}
343 }
344
Popular Tags