1 21 22 package org.dbunit.database; 23 24 import org.dbunit.dataset.CachedTable; 25 import org.dbunit.dataset.DataSetException; 26 import org.dbunit.dataset.ITableMetaData; 27 28 import java.sql.ResultSet ; 29 import java.sql.SQLException ; 30 31 36 public class CachedResultSetTable extends CachedTable implements IResultSetTable 37 { 38 public CachedResultSetTable(ITableMetaData metaData, ResultSet resultSet) 39 throws SQLException , DataSetException 40 { 41 this(new ForwardOnlyResultSetTable(metaData, resultSet)); 42 } 43 44 public CachedResultSetTable(ITableMetaData metaData, 45 IDatabaseConnection connection) throws SQLException , DataSetException 46 { 47 this(new ForwardOnlyResultSetTable(metaData, connection)); 48 } 49 50 public CachedResultSetTable(IResultSetTable table) throws DataSetException, SQLException 51 { 52 super(table.getTableMetaData()); 53 try 54 { 55 addTableRows(table); 56 } 57 finally 58 { 59 table.close(); 60 } 61 } 62 63 66 public void close() throws DataSetException 67 { 68 } 70 } 71 72 73 74 75 76 | Popular Tags |