1 21 package org.apache.derby.iapi.jdbc; 22 23 import java.sql.SQLException ; 24 import org.apache.derby.impl.jdbc.Util; 25 import org.apache.derby.iapi.reference.SQLState; 26 27 28 public class BrokeredStatement40 extends BrokeredStatement { 29 30 38 39 BrokeredStatement40(BrokeredStatementControl control, int jdbcLevel) 40 throws SQLException { 41 super(control, jdbcLevel); 42 } 43 44 51 public final boolean isClosed() throws SQLException { 52 return getStatement().isClosed(); 53 } 54 55 63 public <T> T unwrap(java.lang.Class <T> interfaces) 64 throws SQLException { 65 checkIfClosed(); 66 try { 69 return interfaces.cast(this); 70 } catch (ClassCastException cce) { 71 throw Util.generateCsSQLException(SQLState.UNABLE_TO_UNWRAP, 72 interfaces); 73 } 74 } 75 76 81 public boolean isPoolable() throws SQLException { 82 return getStatement().isPoolable(); 83 } 84 85 90 public void setPoolable(boolean poolable) throws SQLException { 91 getStatement().setPoolable(poolable); 92 } 93 } 94 | Popular Tags |