1 21 22 package org.apache.derby.jdbc; 23 24 import org.apache.derby.impl.jdbc.EmbedConnection; 25 26 import org.apache.derby.iapi.services.sanity.SanityManager; 27 28 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext; 29 import org.apache.derby.iapi.error.StandardException; 30 import org.apache.derby.iapi.jdbc.BrokeredConnection; 31 import org.apache.derby.iapi.jdbc.BrokeredConnection30; 32 import org.apache.derby.iapi.jdbc.BrokeredConnectionControl; 33 import java.sql.Connection ; 34 import java.sql.SQLException ; 35 import org.apache.derby.impl.jdbc.*; 36 37 import java.util.Properties ; 38 39 46 47 public class Driver30 extends Driver20 { 48 49 57 public Connection getNewNestedConnection(EmbedConnection conn) 58 { 59 if (SanityManager.DEBUG) 60 { 61 SanityManager.ASSERT(conn instanceof EmbedConnection30, 62 "conn expected to be instanceof EmbedConnection30"); 63 } 64 return new EmbedConnection30(conn); 65 } 66 67 71 public EmbedConnection getNewEmbedConnection(String url, Properties info) 72 throws SQLException 73 { 74 return new EmbedConnection30(this, url, info); 75 } 76 77 80 public java.sql.PreparedStatement 81 newEmbedPreparedStatement ( 82 EmbedConnection conn, 83 String stmt, 84 boolean forMetaData, 85 int resultSetType, 86 int resultSetConcurrency, 87 int resultSetHoldability, 88 int autoGeneratedKeys, 89 int[] columnIndexes, 90 String [] columnNames) 91 throws SQLException 92 { 93 return new EmbedPreparedStatement30(conn, 94 stmt, 95 forMetaData, 96 resultSetType, 97 resultSetConcurrency, 98 resultSetHoldability, 99 autoGeneratedKeys, 100 columnIndexes, 101 columnNames); 102 } 103 104 107 public java.sql.CallableStatement 108 newEmbedCallableStatement( 109 EmbedConnection conn, 110 String stmt, 111 int resultSetType, 112 int resultSetConcurrency, 113 int resultSetHoldability) 114 throws SQLException 115 { 116 return new EmbedCallableStatement30(conn, 117 stmt, 118 resultSetType, 119 resultSetConcurrency, 120 resultSetHoldability); 121 } 122 public BrokeredConnection newBrokeredConnection(BrokeredConnectionControl control) { 123 124 return new BrokeredConnection30(control); 125 } 126 } 127 | Popular Tags |