public class DataSetUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
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)
Deprecated.
since 2.3.0 - prefer usage of
Columns.getColumn(String, Column[]) |
static java.lang.String |
getEscapedName(java.lang.String name,
java.lang.String escapePattern)
Deprecated.
since 2.3.0. Prefer usage of
QualifiedTableName.getQualifiedName() creating a new QualifiedTableName object |
static java.lang.String |
getQualifiedName(java.lang.String prefix,
java.lang.String name)
Deprecated.
since 2.3.0. Prefer usage of
QualifiedTableName.getQualifiedName() creating a new QualifiedTableName object |
static java.lang.String |
getQualifiedName(java.lang.String prefix,
java.lang.String name,
java.lang.String escapePattern)
Deprecated.
since 2.3.0. Prefer usage of
QualifiedTableName.getQualifiedName() creating a new QualifiedTableName object |
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)
reverses a String array.
|
public static void assertEquals(IDataSet expectedDataSet, IDataSet actualDataSet) throws java.lang.Exception
java.lang.Exceptionpublic static void assertEquals(ITable expectedTable, ITable actualTable) throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String getQualifiedName(java.lang.String prefix,
java.lang.String name)
QualifiedTableName.getQualifiedName() creating a new QualifiedTableName objectnull 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 prefix that qualifies the name and is prepended if the name is not qualified yetname - the name The name to be qualified if it is not qualified alreadypublic static java.lang.String getQualifiedName(java.lang.String prefix,
java.lang.String name,
java.lang.String escapePattern)
QualifiedTableName.getQualifiedName() creating a new QualifiedTableName objectprefix - the prefix that qualifies the name and is prepended if the name is not qualified yetname - the name The name to be qualified if it is not qualified alreadyescapePattern - The escape pattern to be applied on the prefix and the name. Can be null.public static java.lang.String getEscapedName(java.lang.String name,
java.lang.String escapePattern)
QualifiedTableName.getQualifiedName() creating a new QualifiedTableName objectname - 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 typeTypeCastExceptionpublic static Column getColumn(java.lang.String columnName, Column[] columns)
Columns.getColumn(String, Column[])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.DataSetExceptionpublic static ITable[] getTables(IDataSet dataSet) throws DataSetException
DataSetExceptionpublic static ITable[] getTables(ITableIterator iterator) throws DataSetException
DataSetExceptionpublic static java.lang.String[] getReverseTableNames(IDataSet dataSet) throws DataSetException
DataSetExceptionpublic static java.lang.String[] reverseStringArray(java.lang.String[] array)
array - Copyright © 2002-2018. All Rights Reserved.