1 21 22 package org.apache.derby.impl.jdbc; 23 24 import org.apache.derby.jdbc.InternalDriver; 25 26 import java.sql.SQLException ; 27 28 32 33 abstract class ConnectionChild { 34 35 39 EmbedConnection localConn; 40 41 44 final InternalDriver factory; 45 46 49 private java.util.Calendar cal; 50 51 52 ConnectionChild(EmbedConnection conn) { 53 super(); 54 localConn = conn; 55 factory = conn.getLocalDriver(); 56 } 57 58 61 final EmbedConnection getEmbedConnection() { 62 return localConn; 63 } 64 65 69 final Object getConnectionSynchronization() 70 { 71 return localConn.getConnectionSynchronization(); 72 } 73 74 79 final SQLException handleException(Throwable t) 80 throws SQLException { 81 return localConn.handleException(t); 82 } 83 84 88 final void needCommit() { 89 localConn.needCommit(); 90 } 91 92 97 final void commitIfNeeded() throws SQLException { 98 localConn.commitIfNeeded(); 101 } 102 103 108 final void commitIfAutoCommit() throws SQLException { 109 localConn.commitIfAutoCommit(); 112 } 113 114 120 final void setupContextStack() throws SQLException { 121 localConn.setupContextStack(); 122 } 123 124 130 final void restoreContextStack() throws SQLException { 131 localConn.restoreContextStack(); 132 } 133 134 141 java.util.Calendar getCal() { 142 if (cal == null) 143 cal = new java.util.GregorianCalendar (); 144 return cal; 145 } 146 147 SQLException newSQLException(String messageId) { 148 return localConn.newSQLException(messageId); 149 } 150 SQLException newSQLException(String messageId, Object arg1) { 151 return localConn.newSQLException(messageId, arg1); 152 } 153 SQLException newSQLException(String messageId, Object arg1, Object arg2) { 154 return localConn.newSQLException(messageId, arg1, arg2); 155 } 156 } 157 158 159 | Popular Tags |