1 21 22 package org.apache.derby.impl.jdbc; 23 24 import java.sql.ResultSet ; 25 import java.sql.RowIdLifetime ; 26 import java.sql.DatabaseMetaData ; 27 import java.sql.SQLException ; 28 import java.sql.PreparedStatement ; 29 import org.apache.derby.impl.jdbc.Util; 30 import org.apache.derby.iapi.reference.SQLState; 31 32 33 public class EmbedDatabaseMetaData40 extends EmbedDatabaseMetaData { 34 35 private final String url; 36 37 public EmbedDatabaseMetaData40(EmbedConnection connection, String url) throws SQLException { 38 super(connection,url); 39 this.url = url; 40 } 41 42 47 public int getJDBCMajorVersion() { 48 return 4; 49 } 50 51 56 public int getJDBCMinorVersion() { 57 return 0; 58 } 59 60 public RowIdLifetime getRowIdLifetime() throws SQLException { 61 return RowIdLifetime.ROWID_UNSUPPORTED; 62 } 63 64 public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException { 65 return true; 66 } 67 68 public boolean autoCommitFailureClosesAllResultSets() throws SQLException { 69 return false; 71 } 72 73 public boolean providesQueryObjectGenerator() throws SQLException { 74 return false; 75 } 76 77 78 89 public boolean isWrapperFor(Class <?> interfaces) throws SQLException { 90 return interfaces.isInstance(this); 91 } 92 93 101 public <T> T unwrap(java.lang.Class <T> interfaces) 102 throws SQLException { 103 try { 108 return interfaces.cast(this); 109 } catch (ClassCastException cce) { 110 throw newSQLException(SQLState.UNABLE_TO_UNWRAP,interfaces); 111 } 112 } 113 114 } 115 | Popular Tags |