1 23 package com.lutris.appserver.server.sql; 24 25 import java.sql.CallableStatement ; 26 import java.sql.Connection ; 27 import java.sql.PreparedStatement ; 28 import java.sql.ResultSet ; 29 import java.sql.SQLException ; 30 31 38 public interface DBConnection { 39 40 47 public void validate() throws SQLException ; 48 49 54 public void reset() throws SQLException ; 55 56 67 public PreparedStatement prepareStatement(String sql) 68 throws SQLException ; 69 70 79 public CallableStatement prepareCall(String sql) 80 throws SQLException ; 81 82 92 public ResultSet executeQuery(PreparedStatement preparedStmt, 93 String msg) 94 throws SQLException ; 95 96 105 public ResultSet executeQuery(String sql) throws SQLException ; 106 107 119 public int executeUpdate(String sql) throws SQLException ; 120 121 132 public int executeUpdate(PreparedStatement preparedStmt, 133 String msg) 134 throws SQLException ; 135 136 147 public boolean execute(String sql) throws SQLException ; 148 149 156 public void warningCheck(ResultSet resultSet) 157 throws SQLException ; 158 159 163 public void release(); 164 165 178 public boolean handleException(SQLException sqlExcept); 179 180 185 public void commit() throws SQLException ; 186 187 195 public void setAutoCommit(boolean on) throws SQLException ; 196 197 205 public void rollback() throws SQLException ; 206 207 214 public void allocate() throws SQLException ; 215 216 220 public void close(); 221 222 227 public int getGeneration(); 228 229 233 public void incrRequestCount(); 234 235 239 public String getUrl(); 240 241 245 public String getUser(); 246 247 252 public Connection getConnection(); 253 254 258 public boolean isMarkedForDrop(); 259 260 264 public String getDatabaseName(); 265 } 266 | Popular Tags |