|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dbunit.dataset.DataSetUtils
This class contains various methods for manipulating datasets.
Method Summary | |
static void |
assertEquals(IDataSet expectedDataSet,
IDataSet actualDataSet)
Deprecated. Use Assertion.assertEquals |
static void |
assertEquals(ITable expectedTable,
ITable actualTable)
Deprecated. Use Assertion.assertEquals |
static Column |
getColumn(java.lang.String columnName,
Column[] columns)
Search and returns the specified column from the specified column array. |
static java.lang.String |
getEscapedName(java.lang.String name,
java.lang.String escapePattern)
|
static java.lang.String |
getQualifiedName(java.lang.String prefix,
java.lang.String name)
Returns the specified name qualified with the specified prefix. |
static java.lang.String |
getQualifiedName(java.lang.String prefix,
java.lang.String name,
java.lang.String escapePattern)
|
static java.lang.String[] |
getReverseTableNames(IDataSet dataSet)
Returns the table names from the specified dataset in reverse order. |
static java.lang.String |
getSqlValueString(java.lang.Object value,
DataType dataType)
Returns the specified value as a string to be use in an SQL Statement. |
static ITable[] |
getTables(IDataSet dataSet)
Returns the tables from the specified dataset. |
static ITable[] |
getTables(ITableIterator iterator)
Returns the tables from the specified iterator. |
static ITable[] |
getTables(java.lang.String[] names,
IDataSet dataSet)
Search and returns the specified tables from the specified dataSet. |
static java.lang.String[] |
reverseStringArray(java.lang.String[] array)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void assertEquals(IDataSet expectedDataSet, IDataSet actualDataSet) throws java.lang.Exception
java.lang.Exception
public static void assertEquals(ITable expectedTable, ITable actualTable) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getQualifiedName(java.lang.String prefix, java.lang.String name)
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"
.
prefix
- the prefixname
- the name
public static java.lang.String getQualifiedName(java.lang.String prefix, java.lang.String name, java.lang.String escapePattern)
public static java.lang.String getEscapedName(java.lang.String name, java.lang.String escapePattern)
public static java.lang.String getSqlValueString(java.lang.Object value, DataType dataType) throws TypeCastException
myValue
is returned as
'myValue'
.
value
- the valuedataType
- the value data type
TypeCastException
public static Column getColumn(java.lang.String columnName, Column[] columns)
columnName
- the name of the column to search.columns
- the array of columns from which the column must be searched.
null
if the column is not foundpublic static ITable[] getTables(java.lang.String[] names, IDataSet dataSet) throws DataSetException
names
- the names of the tables to search.dataSet
- the dataset from which the tables must be searched.
DataSetException
public static ITable[] getTables(IDataSet dataSet) throws DataSetException
DataSetException
public static ITable[] getTables(ITableIterator iterator) throws DataSetException
DataSetException
public static java.lang.String[] getReverseTableNames(IDataSet dataSet) throws DataSetException
DataSetException
public static java.lang.String[] reverseStringArray(java.lang.String[] array)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |