org.dbunit.dataset
Class ReplacementTable

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

public class ReplacementTable
extends java.lang.Object
implements ITable

Decorator that replace configured values from the decorated table with replacement values.

Since:
Mar 17, 2003
Version:
$Revision: 1.5 $
Author:
Manuel Laflamme

Field Summary
 
Fields inherited from interface org.dbunit.dataset.ITable
NO_VALUE
 
Constructor Summary
ReplacementTable(ITable table)
          Create a new ReplacementTable object that decorates the specified table.
ReplacementTable(ITable table, java.util.Map objectMap, java.util.Map substringMap, java.lang.String startDelimiter, java.lang.String endDelimiter)
           
 
Method Summary
 void addReplacementObject(java.lang.Object originalObject, java.lang.Object replacementObject)
          Add a new Object replacement mapping.
 void addReplacementSubstring(java.lang.String originalSubstring, java.lang.String replacementSubstring)
          Add a new substring replacement mapping.
 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.
 void setSubstringDelimiters(java.lang.String startDelimiter, java.lang.String endDelimiter)
          Sets substring delimiters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplacementTable

public ReplacementTable(ITable table)
Create a new ReplacementTable object that decorates the specified table.

Parameters:
table - the decorated table

ReplacementTable

public ReplacementTable(ITable table,
                        java.util.Map objectMap,
                        java.util.Map substringMap,
                        java.lang.String startDelimiter,
                        java.lang.String endDelimiter)
Method Detail

addReplacementObject

public void addReplacementObject(java.lang.Object originalObject,
                                 java.lang.Object replacementObject)
Add a new Object replacement mapping.

Parameters:
originalObject - the object to replace
replacementObject - the replacement object

addReplacementSubstring

public void addReplacementSubstring(java.lang.String originalSubstring,
                                    java.lang.String replacementSubstring)
Add a new substring replacement mapping.

Parameters:
originalSubstring - the substring to replace
replacementSubstring - the replacement substring

setSubstringDelimiters

public void setSubstringDelimiters(java.lang.String startDelimiter,
                                   java.lang.String endDelimiter)
Sets substring delimiters.


getTableMetaData

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

Specified by:
getTableMetaData in interface ITable

getRowCount

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

Specified by:
getRowCount in interface ITable

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.

Specified by:
getValue in interface ITable
Throws:
DataSetException


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