1 21 22 package org.apache.derby.jdbc; 23 24 import java.sql.SQLException ; 25 import javax.sql.DataSource ; 26 27 import org.apache.derby.impl.jdbc.Util; 28 import org.apache.derby.iapi.reference.SQLState; 29 30 182 public class EmbeddedDataSource40 extends EmbeddedDataSource { 183 184 public EmbeddedDataSource40() { 185 } 186 187 198 public boolean isWrapperFor(Class <?> interfaces) throws SQLException { 199 return interfaces.isInstance(this); 200 } 201 202 210 public <T> T unwrap(java.lang.Class <T> interfaces) 211 throws SQLException { 212 try { 217 return interfaces.cast(this); 218 } catch (ClassCastException cce) { 219 throw Util.generateCsSQLException(SQLState.UNABLE_TO_UNWRAP, 220 interfaces); 221 } 222 } 223 } 224 | Popular Tags |