Package org.dbunit.dataset
Class ReplacementTable
java.lang.Object
org.dbunit.dataset.ReplacementTable
- All Implemented Interfaces:
ITable
Decorator that replaces configured values from the decorated table
with replacement values.
- Since:
- Mar 17, 2003
- Version:
- $Revision$
- Author:
- Manuel Laflamme
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionReplacementTable(ITable table) Create a new ReplacementTable object that decorates the specified table.ReplacementTable(ITable table, Map objectMap, Map substringMap, String startDelimiter, String endDelimiter) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReplacementObject(Object originalObject, Object replacementObject) Add a new Object replacement mapping.voidaddReplacementSubstring(String originalSubstring, String replacementSubstring) Add a new substring replacement mapping.intReturns this table row count.Returns this table metadata.Returns this table value for the specified row and column.voidsetStrictReplacement(boolean strictReplacement) Setting this property to true indicates that when no replacement is found for a delimited substring the replacement will fail fast.voidsetSubstringDelimiters(String startDelimiter, String endDelimiter) Sets substring delimiters.toString()
-
Constructor Details
-
ReplacementTable
Create a new ReplacementTable object that decorates the specified table.- Parameters:
table- the decorated table
-
ReplacementTable
-
-
Method Details
-
setStrictReplacement
public void setStrictReplacement(boolean strictReplacement) Setting this property to true indicates that when no replacement is found for a delimited substring the replacement will fail fast.- Parameters:
strictReplacement- true if replacement should be strict
-
addReplacementObject
Add a new Object replacement mapping.- Parameters:
originalObject- the object to replacereplacementObject- the replacement object
-
addReplacementSubstring
Add a new substring replacement mapping.- Parameters:
originalSubstring- the substring to replacereplacementSubstring- the replacement substring
-
setSubstringDelimiters
Sets substring delimiters. -
getTableMetaData
Description copied from interface:ITableReturns this table metadata.- Specified by:
getTableMetaDatain interfaceITable
-
getRowCount
public int getRowCount()Description copied from interface:ITableReturns this table row count.- Specified by:
getRowCountin interfaceITable
-
getValue
Description copied from interface:ITableReturns this table value for the specified row and column.- Specified by:
getValuein interfaceITable- Parameters:
row- The row index, starting with 0column- The name of the column- Returns:
- The value
- Throws:
DataSetException
-
toString
-