001: /*
002: * Copyright (c) 1998 - 2005 Versant Corporation
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * Versant Corporation - initial API and implementation
010: */
011: package com.versant.core.jdbc.sql.conv;
012:
013: import java.sql.*;
014: import java.io.Reader;
015: import java.io.InputStream;
016: import java.util.Calendar;
017: import java.net.URL;
018: import java.math.BigDecimal;
019:
020: /**
021: * This PreparedStatement is used to capture the conversion done by a converter.
022: */
023: public class DummyPreparedStmt implements PreparedStatement {
024:
025: public String value;
026: public boolean toQuote = false;
027:
028: public DummyPreparedStmt() {
029: }
030:
031: public void setFloat(int parameterIndex, float x)
032: throws SQLException {
033: value = String.valueOf(x);
034: }
035:
036: public void setDouble(int parameterIndex, double x)
037: throws SQLException {
038: value = String.valueOf(x);
039: }
040:
041: public void setRef(int i, Ref x) throws SQLException {
042: //To change body of implemented methods use Options | File Templates.
043: }
044:
045: public void setBoolean(int parameterIndex, boolean x)
046: throws SQLException {
047: value = String.valueOf(x);
048: }
049:
050: public void setString(int parameterIndex, String x)
051: throws SQLException {
052: value = String.valueOf(x);
053: toQuote = true;
054: }
055:
056: public void setLong(int parameterIndex, long x) throws SQLException {
057: value = String.valueOf(x);
058: }
059:
060: public void setShort(int parameterIndex, short x)
061: throws SQLException {
062: value = String.valueOf(x);
063: }
064:
065: public void setDate(int parameterIndex, Date x) throws SQLException {
066: value = String.valueOf(x);
067: }
068:
069: public void setDate(int parameterIndex, Date x, Calendar cal)
070: throws SQLException {
071: value = String.valueOf(x);
072: }
073:
074: public void setInt(int parameterIndex, int x) throws SQLException {
075: value = String.valueOf(x);
076: }
077:
078: public void setByte(int parameterIndex, byte x) throws SQLException {
079: value = String.valueOf(x);
080: }
081:
082: public void setCharacterStream(int parameterIndex, Reader reader,
083: int length) throws SQLException {
084: //To change body of implemented methods use Options | File Templates.
085: }
086:
087: public void setBlob(int i, Blob x) throws SQLException {
088: //To change body of implemented methods use Options | File Templates.
089: }
090:
091: public void setBinaryStream(int parameterIndex, InputStream x,
092: int length) throws SQLException {
093: //To change body of implemented methods use Options | File Templates.
094: }
095:
096: public void setTimestamp(int parameterIndex, Timestamp x)
097: throws SQLException {
098: //To change body of implemented methods use Options | File Templates.
099: }
100:
101: public void setTimestamp(int parameterIndex, Timestamp x,
102: Calendar cal) throws SQLException {
103: //To change body of implemented methods use Options | File Templates.
104: }
105:
106: public void setBytes(int parameterIndex, byte x[])
107: throws SQLException {
108: //To change body of implemented methods use Options | File Templates.
109: }
110:
111: public void setClob(int i, Clob x) throws SQLException {
112: //To change body of implemented methods use Options | File Templates.
113: }
114:
115: public void setAsciiStream(int parameterIndex, InputStream x,
116: int length) throws SQLException {
117: //To change body of implemented methods use Options | File Templates.
118: }
119:
120: public void setURL(int parameterIndex, URL x) throws SQLException {
121: //To change body of implemented methods use Options | File Templates.
122: }
123:
124: public void setArray(int i, Array x) throws SQLException {
125: //To change body of implemented methods use Options | File Templates.
126: }
127:
128: public void setObject(int parameterIndex, Object x,
129: int targetSqlType) throws SQLException {
130: //To change body of implemented methods use Options | File Templates.
131: }
132:
133: public void setObject(int parameterIndex, Object x,
134: int targetSqlType, int scale) throws SQLException {
135: //To change body of implemented methods use Options | File Templates.
136: }
137:
138: public void setBigDecimal(int parameterIndex, BigDecimal x)
139: throws SQLException {
140: //To change body of implemented methods use Options | File Templates.
141: }
142:
143: public void setUnicodeStream(int parameterIndex, InputStream x,
144: int length) throws SQLException {
145: //To change body of implemented methods use Options | File Templates.
146: }
147:
148: public void setTime(int parameterIndex, Time x) throws SQLException {
149: //To change body of implemented methods use Options | File Templates.
150: }
151:
152: public void setTime(int parameterIndex, Time x, Calendar cal)
153: throws SQLException {
154: //To change body of implemented methods use Options | File Templates.
155: }
156:
157: public ResultSet executeQuery() throws SQLException {
158: return null; //To change body of implemented methods use Options | File Templates.
159: }
160:
161: public int executeUpdate() throws SQLException {
162: return 0; //To change body of implemented methods use Options | File Templates.
163: }
164:
165: public void clearParameters() throws SQLException {
166: //To change body of implemented methods use Options | File Templates.
167: }
168:
169: public void addBatch() throws SQLException {
170: //To change body of implemented methods use Options | File Templates.
171: }
172:
173: public void setNull(int parameterIndex, int sqlType)
174: throws SQLException {
175: //To change body of implemented methods use Options | File Templates.
176: }
177:
178: public void setNull(int paramIndex, int sqlType, String typeName)
179: throws SQLException {
180: //To change body of implemented methods use Options | File Templates.
181: }
182:
183: public ParameterMetaData getParameterMetaData() throws SQLException {
184: return null; //To change body of implemented methods use Options | File Templates.
185: }
186:
187: public ResultSetMetaData getMetaData() throws SQLException {
188: return null; //To change body of implemented methods use Options | File Templates.
189: }
190:
191: public boolean execute() throws SQLException {
192: return false; //To change body of implemented methods use Options | File Templates.
193: }
194:
195: public void setObject(int parameterIndex, Object x)
196: throws SQLException {
197: //To change body of implemented methods use Options | File Templates.
198: }
199:
200: public void setQueryTimeout(int seconds) throws SQLException {
201: //To change body of implemented methods use Options | File Templates.
202: }
203:
204: public void setCursorName(String name) throws SQLException {
205: //To change body of implemented methods use Options | File Templates.
206: }
207:
208: public int getFetchSize() throws SQLException {
209: return 0; //To change body of implemented methods use Options | File Templates.
210: }
211:
212: public int getUpdateCount() throws SQLException {
213: return 0; //To change body of implemented methods use Options | File Templates.
214: }
215:
216: public ResultSet getGeneratedKeys() throws SQLException {
217: return null; //To change body of implemented methods use Options | File Templates.
218: }
219:
220: public ResultSet executeQuery(String sql) throws SQLException {
221: return null; //To change body of implemented methods use Options | File Templates.
222: }
223:
224: public Connection getConnection() throws SQLException {
225: return null; //To change body of implemented methods use Options | File Templates.
226: }
227:
228: public void cancel() throws SQLException {
229: //To change body of implemented methods use Options | File Templates.
230: }
231:
232: public void setMaxFieldSize(int max) throws SQLException {
233: //To change body of implemented methods use Options | File Templates.
234: }
235:
236: public void setEscapeProcessing(boolean enable) throws SQLException {
237: //To change body of implemented methods use Options | File Templates.
238: }
239:
240: public void setMaxRows(int max) throws SQLException {
241: //To change body of implemented methods use Options | File Templates.
242: }
243:
244: public SQLWarning getWarnings() throws SQLException {
245: return null; //To change body of implemented methods use Options | File Templates.
246: }
247:
248: public int getResultSetConcurrency() throws SQLException {
249: return 0; //To change body of implemented methods use Options | File Templates.
250: }
251:
252: public int executeUpdate(String sql) throws SQLException {
253: return 0; //To change body of implemented methods use Options | File Templates.
254: }
255:
256: public int executeUpdate(String sql, int autoGeneratedKeys)
257: throws SQLException {
258: return 0; //To change body of implemented methods use Options | File Templates.
259: }
260:
261: public int executeUpdate(String sql, int columnIndexes[])
262: throws SQLException {
263: return 0; //To change body of implemented methods use Options | File Templates.
264: }
265:
266: public int executeUpdate(String sql, String columnNames[])
267: throws SQLException {
268: return 0; //To change body of implemented methods use Options | File Templates.
269: }
270:
271: public int getFetchDirection() throws SQLException {
272: return 0; //To change body of implemented methods use Options | File Templates.
273: }
274:
275: public void setFetchDirection(int direction) throws SQLException {
276: //To change body of implemented methods use Options | File Templates.
277: }
278:
279: public int getQueryTimeout() throws SQLException {
280: return 0; //To change body of implemented methods use Options | File Templates.
281: }
282:
283: public int getResultSetType() throws SQLException {
284: return 0; //To change body of implemented methods use Options | File Templates.
285: }
286:
287: public void clearWarnings() throws SQLException {
288: //To change body of implemented methods use Options | File Templates.
289: }
290:
291: public void addBatch(String sql) throws SQLException {
292: //To change body of implemented methods use Options | File Templates.
293: }
294:
295: public void close() throws SQLException {
296: //To change body of implemented methods use Options | File Templates.
297: }
298:
299: public int getMaxFieldSize() throws SQLException {
300: return 0; //To change body of implemented methods use Options | File Templates.
301: }
302:
303: public void clearBatch() throws SQLException {
304: //To change body of implemented methods use Options | File Templates.
305: }
306:
307: public boolean getMoreResults() throws SQLException {
308: return false; //To change body of implemented methods use Options | File Templates.
309: }
310:
311: public boolean getMoreResults(int current) throws SQLException {
312: return false; //To change body of implemented methods use Options | File Templates.
313: }
314:
315: public int getMaxRows() throws SQLException {
316: return 0; //To change body of implemented methods use Options | File Templates.
317: }
318:
319: public boolean execute(String sql) throws SQLException {
320: return false; //To change body of implemented methods use Options | File Templates.
321: }
322:
323: public boolean execute(String sql, int autoGeneratedKeys)
324: throws SQLException {
325: return false; //To change body of implemented methods use Options | File Templates.
326: }
327:
328: public boolean execute(String sql, int columnIndexes[])
329: throws SQLException {
330: return false; //To change body of implemented methods use Options | File Templates.
331: }
332:
333: public boolean execute(String sql, String columnNames[])
334: throws SQLException {
335: return false; //To change body of implemented methods use Options | File Templates.
336: }
337:
338: public void setFetchSize(int rows) throws SQLException {
339: //To change body of implemented methods use Options | File Templates.
340: }
341:
342: public ResultSet getResultSet() throws SQLException {
343: return null; //To change body of implemented methods use Options | File Templates.
344: }
345:
346: public int[] executeBatch() throws SQLException {
347: return new int[0]; //To change body of implemented methods use Options | File Templates.
348: }
349:
350: public int getResultSetHoldability() throws SQLException {
351: return 0; //To change body of implemented methods use Options | File Templates.
352: }
353: }
|