| java.lang.Object org.dbunit.dataset.DataSetUtils
DataSetUtils | public class DataSetUtils (Code) | | This class contains various methods for manipulating datasets.
author: Manuel Laflamme version: $Revision: 554 $ since: Feb 19, 2002 |
assertEquals | public static void assertEquals(IDataSet expectedDataSet, IDataSet actualDataSet) throws Exception(Code) | | Asserts that the two specified dataset are equals. This method ignore
the tables order.
|
assertEquals | public static void assertEquals(ITable expectedTable, ITable actualTable) throws Exception(Code) | | Asserts that the two specified tables are equals. This method ignore the
table names, the columns order, the columns data type and the primary
keys.
|
getColumn | public static Column getColumn(String columnName, Column[] columns)(Code) | | Search and returns the specified column from the specified column array.
Parameters: columnName - the name of the column to search. Parameters: columns - the array of columns from which the column must be searched. the column or null if the column is not found |
getQualifiedName | public static String getQualifiedName(String prefix, String name)(Code) | | Returns the specified name qualified with the specified prefix. The name
is not modified if the prefix is null or if the name is
already qualified.
Example:
getQualifiedName(null, "NAME") returns
"NAME" . getQualifiedName("PREFIX", "NAME")
returns "PREFIX.NAME" and
getQualifiedName("PREFIX2", "PREFIX1.NAME")
returns "PREFIX1.NAME" .
Parameters: prefix - the prefix Parameters: name - the name the qualified name |
getReverseTableNames | public static String[] getReverseTableNames(IDataSet dataSet) throws DataSetException(Code) | | Returns the table names from the specified dataset in reverse order.
|
getSqlValueString | public static String getSqlValueString(Object value, DataType dataType) throws TypeCastException(Code) | | Returns the specified value as a string to be use in an SQL Statement.
For example the string myValue is returned as
'myValue' .
Parameters: value - the value Parameters: dataType - the value data type the SQL string value |
getTables | public static ITable[] getTables(String[] names, IDataSet dataSet) throws DataSetException(Code) | | Search and returns the specified tables from the specified dataSet.
Parameters: names - the names of the tables to search. Parameters: dataSet - the dataset from which the tables must be searched. the tables or an empty array if no tables are found. |
|
|