1 21 package org.dbunit.dataset.filter; 22 23 import org.dbunit.dataset.*; 24 25 30 public class SequenceTableIterator implements ITableIterator 31 { 32 private final String [] _tableNames; 33 private final IDataSet _dataSet; 34 private int _index = -1; 35 36 public SequenceTableIterator(String [] tableNames, IDataSet dataSet) 37 { 38 _tableNames = tableNames; 39 _dataSet = dataSet; 40 } 41 42 45 public boolean next() throws DataSetException 46 { 47 _index++; 48 return _index < _tableNames.length; 49 } 50 51 public ITableMetaData getTableMetaData() throws DataSetException 52 { 53 return _dataSet.getTableMetaData(_tableNames[_index]); 54 } 55 56 public ITable getTable() throws DataSetException 57 { 58 return _dataSet.getTable(_tableNames[_index]); 59 } 60 } 61 | Popular Tags |