1 21 package org.apache.derby.impl.jdbc; 22 23 import java.sql.SQLException ; 24 25 import org.apache.derby.iapi.reference.SQLState; 26 import org.apache.derby.iapi.sql.ResultColumnDescriptor; 27 28 public class EmbedResultSetMetaData40 extends EmbedResultSetMetaData { 29 30 public EmbedResultSetMetaData40(ResultColumnDescriptor[] columnInfo) { 31 super(columnInfo); 32 } 33 34 45 public boolean isWrapperFor(Class <?> interfaces) throws SQLException { 46 return interfaces.isInstance(this); 47 } 48 49 57 public <T> T unwrap(java.lang.Class <T> interfaces) 58 throws SQLException { 59 try { 64 return interfaces.cast(this); 65 } catch (ClassCastException cce) { 66 throw Util.generateCsSQLException(SQLState.UNABLE_TO_UNWRAP, 67 interfaces); 68 } 69 } 70 } 71 | Popular Tags |