1 package org.hibernate.jdbc; 3 4 import java.sql.CallableStatement ; 5 import java.sql.Connection ; 6 import java.sql.PreparedStatement ; 7 import java.sql.ResultSet ; 8 import java.sql.SQLException ; 9 10 import org.hibernate.HibernateException; 11 import org.hibernate.ScrollMode; 12 import org.hibernate.dialect.Dialect; 13 14 24 public interface Batcher { 25 30 public PreparedStatement prepareQueryStatement(String sql, boolean scrollable, ScrollMode scrollMode) throws SQLException , HibernateException; 31 34 public void closeQueryStatement(PreparedStatement ps, ResultSet rs) throws SQLException ; 35 40 public CallableStatement prepareCallableQueryStatement(String sql, boolean scrollable, ScrollMode scrollMode) throws SQLException , HibernateException; 41 42 43 47 public PreparedStatement prepareSelectStatement(String sql) throws SQLException , HibernateException; 48 49 53 public PreparedStatement prepareStatement(String sql, boolean useGetGeneratedKeys) throws SQLException , HibernateException; 54 58 public PreparedStatement prepareStatement(String sql) throws SQLException , HibernateException; 59 60 64 public CallableStatement prepareCallableStatement(String sql) throws SQLException , HibernateException; 65 66 69 public void closeStatement(PreparedStatement ps) throws SQLException ; 70 77 public PreparedStatement prepareBatchStatement(String sql) throws SQLException , HibernateException; 78 79 86 public CallableStatement prepareBatchCallableStatement(String sql) throws SQLException , HibernateException; 87 88 92 public void addToBatch(int expectedRowCount) throws SQLException , HibernateException; 93 94 97 public void executeBatch() throws HibernateException; 98 99 102 public void closeStatements(); 103 106 public ResultSet getResultSet(PreparedStatement ps) throws SQLException ; 107 110 public ResultSet getResultSet(CallableStatement ps, Dialect dialect) throws SQLException ; 111 112 116 public void abortBatch(SQLException sqle); 117 118 121 public void cancelLastQuery() throws HibernateException; 122 123 public boolean hasOpenResources(); 124 125 public String openResourceStatsAsString(); 126 127 129 132 public Connection openConnection() throws HibernateException; 133 136 public void closeConnection(Connection conn) throws HibernateException; 137 138 139 } 140 141 142 143 144 145 146 | Popular Tags |