1 package org.apache.ojb.broker.accesslayer; 2 3 17 18 import java.sql.ResultSet ; 19 import java.sql.Statement ; 20 21 import org.apache.ojb.broker.accesslayer.sql.SelectStatement; 22 23 28 public class ResultSetAndStatement 29 { 30 32 private final StatementManagerIF manager; 33 private boolean isClosed; 34 38 public final ResultSet m_rs; 39 public final Statement m_stmt; 40 public final SelectStatement m_sql; 41 42 public ResultSetAndStatement(StatementManagerIF manager, Statement stmt, ResultSet rs, SelectStatement sql) 43 { 44 this.manager = manager; 45 m_stmt = stmt; 46 m_rs = rs; 47 m_sql = sql; 48 isClosed = false; 49 } 50 51 57 public void close() 58 { 59 if(!isClosed) 60 { 61 manager.closeResources(m_stmt, m_rs); 62 isClosed = true; 63 } 64 } 65 66 } 86 | Popular Tags |