1 21 22 package org.apache.derby.impl.jdbc; 23 24 import java.sql.SQLException ; 25 import org.apache.derby.iapi.reference.SQLState; 26 27 public class EmbedStatement40 extends EmbedStatement { 28 29 40 public EmbedStatement40 (EmbedConnection connection, boolean forMetaData, 41 int resultSetType, int resultSetConcurrency, 42 int resultSetHoldability) { 43 super(connection,forMetaData,resultSetType,resultSetConcurrency, 44 resultSetHoldability); 45 } 46 47 58 public boolean isWrapperFor(Class <?> interfaces) throws SQLException { 59 checkStatus(); 60 return interfaces.isInstance(this); 61 } 62 63 71 public <T> T unwrap(java.lang.Class <T> interfaces) 72 throws SQLException { 73 checkStatus(); 74 try { 75 return interfaces.cast(this); 76 } catch (ClassCastException cce) { 77 throw newSQLException(SQLState.UNABLE_TO_UNWRAP,interfaces); 78 } 79 } 80 81 } 82 | Popular Tags |