|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dbunit.dataset.ReplacementTable
public class ReplacementTable
Decorator that replaces configured values from the decorated table with replacement values.
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,
Map objectMap,
Map substringMap,
String startDelimiter,
String endDelimiter)
|
Method Summary | |
---|---|
void |
addReplacementObject(Object originalObject,
Object replacementObject)
Add a new Object replacement mapping. |
void |
addReplacementSubstring(String originalSubstring,
String replacementSubstring)
Add a new substring replacement mapping. |
int |
getRowCount()
Returns this table row count. |
ITableMetaData |
getTableMetaData()
Returns this table metadata. |
Object |
getValue(int row,
String column)
Returns this table value for the specified row and column. |
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. |
void |
setSubstringDelimiters(String startDelimiter,
String endDelimiter)
Sets substring delimiters. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReplacementTable(ITable table)
table
- the decorated tablepublic ReplacementTable(ITable table, Map objectMap, Map substringMap, String startDelimiter, String endDelimiter)
Method Detail |
---|
public void setStrictReplacement(boolean strictReplacement)
strictReplacement
- true if replacement should be strictpublic void addReplacementObject(Object originalObject, Object replacementObject)
originalObject
- the object to replacereplacementObject
- the replacement objectpublic void addReplacementSubstring(String originalSubstring, String replacementSubstring)
originalSubstring
- the substring to replacereplacementSubstring
- the replacement substringpublic void setSubstringDelimiters(String startDelimiter, String endDelimiter)
public ITableMetaData getTableMetaData()
ITable
getTableMetaData
in interface ITable
public int getRowCount()
ITable
getRowCount
in interface ITable
public Object getValue(int row, String column) throws DataSetException
ITable
getValue
in interface ITable
row
- The row index, starting with 0column
- The name of the column
NoSuchColumnException
- if specified column name do not exist in
this table
RowOutOfBoundsException
- if specified row is less than zero or
equals or greater than getRowCount
DataSetException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |