org.dbunit.dataset
Class SortedTable

java.lang.Object
  extended byorg.dbunit.dataset.AbstractTable
      extended byorg.dbunit.dataset.SortedTable
All Implemented Interfaces:
ITable

public class SortedTable
extends AbstractTable

This is a ITable decorator that provide a sorted view of the decorated table. This implementation does not keep a separate copy of the decorated table data.

Since:
Feb 19, 2003
Version:
$Revision: 1.5 $
Author:
Manuel Laflamme

Field Summary
 
Fields inherited from interface org.dbunit.dataset.ITable
NO_VALUE
 
Constructor Summary
SortedTable(ITable table)
          Sort the decorated table by its own columns order.
SortedTable(ITable table, Column[] columns)
          Sort the decorated table by specified columns order.
SortedTable(ITable table, ITableMetaData metaData)
          Sort the decorated table by specified metadata columns order.
SortedTable(ITable table, java.lang.String[] columnNames)
          Sort the decorated table by specified columns order.
 
Method Summary
 int getRowCount()
          Returns this table row count.
 ITableMetaData getTableMetaData()
          Returns this table metadata.
 java.lang.Object getValue(int row, java.lang.String column)
          Returns this table value for the specified row and column.
 
Methods inherited from class org.dbunit.dataset.AbstractTable
assertValidColumn, assertValidRowIndex, assertValidRowIndex, getColumnIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortedTable

public SortedTable(ITable table,
                   Column[] columns)
Sort the decorated table by specified columns order.


SortedTable

public SortedTable(ITable table,
                   java.lang.String[] columnNames)
            throws DataSetException
Sort the decorated table by specified columns order.


SortedTable

public SortedTable(ITable table,
                   ITableMetaData metaData)
            throws DataSetException
Sort the decorated table by specified metadata columns order. All metadata columns will be used.


SortedTable

public SortedTable(ITable table)
            throws DataSetException
Sort the decorated table by its own columns order. All table columns will be used.

Method Detail

getTableMetaData

public ITableMetaData getTableMetaData()
Description copied from interface: ITable
Returns this table metadata.


getRowCount

public int getRowCount()
Description copied from interface: ITable
Returns this table row count.


getValue

public java.lang.Object getValue(int row,
                                 java.lang.String column)
                          throws DataSetException
Description copied from interface: ITable
Returns this table value for the specified row and column.

Throws:
DataSetException


Copyright © 2002-2004 DbUnit.org. All Rights Reserved.