001: /*
002:
003: Derby - Class org.apache.derby.impl.jdbc.EmbedCallableStatement40
004:
005: Licensed to the Apache Software Foundation (ASF) under one or more
006: contributor license agreements. See the NOTICE file distributed with
007: this work for additional information regarding copyright ownership.
008: The ASF licenses this file to you under the Apache License, Version 2.0
009: (the "License"); you may not use this file except in compliance with
010: the License. You may obtain a copy of the License at
011:
012: http://www.apache.org/licenses/LICENSE-2.0
013:
014: Unless required by applicable law or agreed to in writing, software
015: distributed under the License is distributed on an "AS IS" BASIS,
016: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: See the License for the specific language governing permissions and
018: limitations under the License.
019:
020: */
021:
022: package org.apache.derby.impl.jdbc;
023:
024: import java.io.InputStream;
025: import java.io.Reader;
026: import java.sql.Blob;
027: import java.sql.Clob;
028: import java.sql.NClob;
029: import java.sql.ParameterMetaData;
030: import java.sql.RowId;
031: import java.sql.SQLException;
032: import java.sql.SQLXML;
033:
034: import org.apache.derby.iapi.reference.SQLState;
035:
036: public class EmbedCallableStatement40 extends EmbedCallableStatement30 {
037:
038: /** Creates a new instance of EmbedCallableStatement40 */
039: public EmbedCallableStatement40(EmbedConnection conn, String sql,
040: int resultSetType, int resultSetConcurrency,
041: int resultSetHoldability) throws SQLException {
042: super (conn, sql, resultSetType, resultSetConcurrency,
043: resultSetHoldability);
044: }
045:
046: public Reader getCharacterStream(String parameterName)
047: throws SQLException {
048: throw Util.notImplemented();
049: }
050:
051: public Reader getNCharacterStream(int parameterIndex)
052: throws SQLException {
053: throw Util.notImplemented();
054: }
055:
056: public Reader getNCharacterStream(String parameterName)
057: throws SQLException {
058: throw Util.notImplemented();
059: }
060:
061: public String getNString(int parameterIndex) throws SQLException {
062: throw Util.notImplemented();
063: }
064:
065: public String getNString(String parameterName) throws SQLException {
066: throw Util.notImplemented();
067: }
068:
069: public void setBlob(String parameterName, Blob x)
070: throws SQLException {
071: throw Util.notImplemented();
072: }
073:
074: public void setClob(String parameterName, Clob x)
075: throws SQLException {
076: throw Util.notImplemented();
077: }
078:
079: public RowId getRowId(int parameterIndex) throws SQLException {
080: throw Util.notImplemented();
081: }
082:
083: public RowId getRowId(String parameterName) throws SQLException {
084: throw Util.notImplemented();
085: }
086:
087: public void setRowId(String parameterName, RowId x)
088: throws SQLException {
089: throw Util.notImplemented();
090: }
091:
092: public void setNString(String parameterName, String value)
093: throws SQLException {
094: throw Util.notImplemented();
095: }
096:
097: public void setNCharacterStream(String parameterName, Reader value,
098: long length) throws SQLException {
099: throw Util.notImplemented();
100: }
101:
102: public void setNClob(String parameterName, NClob value)
103: throws SQLException {
104: throw Util.notImplemented();
105: }
106:
107: public void setClob(String parameterName, Reader reader, long length)
108: throws SQLException {
109: throw Util.notImplemented();
110:
111: }
112:
113: public void setBlob(String parameterName, InputStream inputStream,
114: long length) throws SQLException {
115: throw Util.notImplemented();
116: }
117:
118: public void setNClob(String parameterName, Reader reader,
119: long length) throws SQLException {
120: throw Util.notImplemented();
121: }
122:
123: public NClob getNClob(int i) throws SQLException {
124: throw Util.notImplemented();
125: }
126:
127: public NClob getNClob(String parameterName) throws SQLException {
128: throw Util.notImplemented();
129: }
130:
131: public void setSQLXML(String parameterName, SQLXML xmlObject)
132: throws SQLException {
133: throw Util.notImplemented();
134:
135: }
136:
137: public SQLXML getSQLXML(int parameterIndex) throws SQLException {
138: throw Util.notImplemented();
139: }
140:
141: public SQLXML getSQLXML(String parametername) throws SQLException {
142: throw Util.notImplemented();
143: }
144:
145: /************************************************************************
146: * The prepared statement methods
147: *************************************************************************/
148:
149: public void setRowId(int parameterIndex, RowId x)
150: throws SQLException {
151: throw Util.notImplemented("setRowId(int, RowId)");
152: }
153:
154: public void setNString(int index, String value) throws SQLException {
155: throw Util.notImplemented("setNString (int,value)");
156: }
157:
158: public void setNCharacterStream(int parameterIndex, Reader value)
159: throws SQLException {
160: throw Util.notImplemented();
161: }
162:
163: public void setNCharacterStream(int index, Reader value, long length)
164: throws SQLException {
165: throw Util
166: .notImplemented("setNCharacterStream (int, Reader, long)");
167: }
168:
169: public void setNClob(int index, NClob value) throws SQLException {
170: throw Util.notImplemented("setNClob (int, NClob)");
171: }
172:
173: public void setNClob(int parameterIndex, Reader reader)
174: throws SQLException {
175: throw Util.notImplemented();
176: }
177:
178: public void setNClob(int parameterIndex, Reader reader, long length)
179: throws SQLException {
180: throw Util.notImplemented("setNClob(int,reader,length)");
181: }
182:
183: public void setSQLXML(int parameterIndex, SQLXML xmlObject)
184: throws SQLException {
185: throw Util.notImplemented("setSQLXML (int, SQLXML)");
186: }
187:
188: /**
189: * JDBC 4.0
190: *
191: * Retrieves the number, types and properties of this CallableStatement
192: * object's parameters.
193: *
194: * @return a ParameterMetaData object that contains information about the
195: * number, types and properties of this CallableStatement object's parameters.
196: * @exception SQLException if a database access error occurs
197: *
198: */
199: public ParameterMetaData getParameterMetaData() throws SQLException {
200: checkStatus();
201: return new EmbedParameterMetaData40(getParms(),
202: preparedStatement.getParameterTypes());
203: }
204:
205: /**
206: * Returns false unless <code>interfaces</code> is implemented
207: *
208: * @param interfaces a Class defining an interface.
209: * @return true if this implements the interface or
210: * directly or indirectly wraps an object
211: * that does.
212: * @throws java.sql.SQLException if an error occurs while determining
213: * whether this is a wrapper for an object
214: * with the given interface.
215: */
216: public boolean isWrapperFor(Class<?> interfaces)
217: throws SQLException {
218: checkStatus();
219: return interfaces.isInstance(this );
220: }
221:
222: public void setAsciiStream(String parameterName, InputStream x)
223: throws SQLException {
224: throw Util.notImplemented("setAsciiStream(String,InputStream)");
225: }
226:
227: public void setBinaryStream(String parameterName, InputStream x)
228: throws SQLException {
229: throw Util
230: .notImplemented("setBinaryStream(String,InputStream)");
231: }
232:
233: public void setBlob(String parameterName, InputStream inputStream)
234: throws SQLException {
235: throw Util.notImplemented("setBlob(String,InputStream)");
236: }
237:
238: public void setCharacterStream(String parameterName, Reader reader)
239: throws SQLException {
240: throw Util.notImplemented("setCharacterStream(String,Reader)");
241: }
242:
243: public void setClob(String parameterName, Reader reader)
244: throws SQLException {
245: throw Util.notImplemented("setClob(String,Reader)");
246: }
247:
248: public void setNCharacterStream(String parameterName, Reader value)
249: throws SQLException {
250: throw Util.notImplemented("setNCharacterStream(String,Reader)");
251: }
252:
253: public void setNClob(String parameterName, Reader reader)
254: throws SQLException {
255: throw Util.notImplemented("setNClob(String,Reader)");
256: }
257:
258: /**
259: * Returns <code>this</code> if this class implements the interface
260: *
261: * @param interfaces a Class defining an interface
262: * @return an object that implements the interface
263: * @throws java.sql.SQLException if no object if found that implements the
264: * interface
265: */
266: public <T> T unwrap(java.lang.Class<T> interfaces)
267: throws SQLException {
268: checkStatus();
269: try {
270: return interfaces.cast(this );
271: } catch (ClassCastException cce) {
272: throw newSQLException(SQLState.UNABLE_TO_UNWRAP, interfaces);
273: }
274: }
275:
276: /**
277: * Sets the designated parameter to the given input stream, which will have
278: * the specified number of bytes.
279: *
280: * @param parameterName the name of the first parameter
281: * @param x the java input stream which contains the ASCII parameter value
282: * @param length the number of bytes in the stream
283: * @exception SQLException thrown on failure.
284: *
285: */
286:
287: public final void setAsciiStream(String parameterName,
288: InputStream x, long length) throws SQLException {
289: throw Util.notImplemented();
290: }
291:
292: /**
293: * Sets the designated parameter to the given input stream, which will have
294: * the specified number of bytes.
295: *
296: * @param parameterName the name of the first parameter
297: * @param x the java input stream which contains the binary parameter value
298: * @param length the number of bytes in the stream
299: * @exception SQLException thrown on failure.
300: *
301: */
302:
303: public final void setBinaryStream(String parameterName,
304: InputStream x, long length) throws SQLException {
305: throw Util.notImplemented();
306: }
307:
308: /**
309: * Sets the designated parameter to the given Reader, which will have
310: * the specified number of bytes.
311: *
312: * @param parameterName the name of the first parameter
313: * @param x the java Reader which contains the UNICODE value
314: * @param length the number of bytes in the stream
315: * @exception SQLException thrown on failure.
316: *
317: */
318:
319: public final void setCharacterStream(String parameterName,
320: Reader x, long length) throws SQLException {
321: throw Util.notImplemented();
322: }
323: }
|