--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.impl.jdbc.EmbedStatement40\r
+\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to you under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.impl.jdbc;\r
+\r
+import java.sql.SQLException;\r
+import org.apache.derby.iapi.reference.SQLState;\r
+\r
+public class EmbedStatement40 extends EmbedStatement {\r
+ \r
+ /**\r
+ * calls superclass contructor with the parameter passed\r
+ *\r
+ * @param connection EmbedConnection object associated with this \r
+ * statement \r
+ * @param forMetaData boolean\r
+ * @param resultSetType int\r
+ * @param resultSetConcurrency int\r
+ * @param resultSetHoldability int\r
+ * \r
+ */\r
+ public EmbedStatement40 (EmbedConnection connection, boolean forMetaData,\r
+ int resultSetType, int resultSetConcurrency, \r
+ int resultSetHoldability) {\r
+ super(connection,forMetaData,resultSetType,resultSetConcurrency,\r
+ resultSetHoldability);\r
+ }\r
+ \r
+ /**\r
+ * Returns false unless <code>interfaces</code> is implemented \r
+ * \r
+ * @param interfaces a Class defining an interface.\r
+ * @return true if this implements the interface or \r
+ * directly or indirectly wraps an object \r
+ * that does.\r
+ * @throws java.sql.SQLException if an error occurs while determining \r
+ * whether this is a wrapper for an object \r
+ * with the given interface.\r
+ */\r
+ public boolean isWrapperFor(Class<?> interfaces) throws SQLException {\r
+ checkStatus();\r
+ return interfaces.isInstance(this);\r
+ }\r
+ \r
+ /**\r
+ * Returns <code>this</code> if this class implements the interface\r
+ *\r
+ * @param interfaces a Class defining an interface\r
+ * @return an object that implements the interface\r
+ * @throws java.sql.SQLExption if no object if found that implements the \r
+ * interface\r
+ */\r
+ public <T> T unwrap(java.lang.Class<T> interfaces)\r
+ throws SQLException{\r
+ checkStatus();\r
+ try {\r
+ return interfaces.cast(this);\r
+ } catch (ClassCastException cce) {\r
+ throw newSQLException(SQLState.UNABLE_TO_UNWRAP,interfaces);\r
+ }\r
+ }\r
+ \r
+}\r