com.metamatrix.core.commandshell
Class ConnectorResultUtility

java.lang.Object
  extended by com.metamatrix.core.commandshell.ConnectorResultUtility

public class ConnectorResultUtility
extends java.lang.Object

Provides utility methods for manipulating the results of executing commands against a connector.


Constructor Summary
ConnectorResultUtility()
           
 
Method Summary
static java.lang.String compareResultsStrings(java.lang.String expected, java.lang.String actual)
          Compares two sets of results to determine if they are identical.
static java.lang.String resultsToString(java.util.List results)
           
static java.lang.String resultsToString(java.util.List results, java.lang.String[] columnNames)
          Converts a List of Lists, where each sub-list is a row of data, into a tab delimited String where each line is a row of data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectorResultUtility

public ConnectorResultUtility()
Method Detail

resultsToString

public static java.lang.String resultsToString(java.util.List results,
                                               java.lang.String[] columnNames)
Converts a List of Lists, where each sub-list is a row of data, into a tab delimited String where each line is a row of data. Each object is converted to a String.

Parameters:
results - a List of Lists of data typcially obtained by executing a command on a connector through the ConnectorHost
Returns:
the results converted to a tab delimited String

resultsToString

public static java.lang.String resultsToString(java.util.List results)

compareResultsStrings

public static java.lang.String compareResultsStrings(java.lang.String expected,
                                                     java.lang.String actual)
Compares two sets of results to determine if they are identical. The results are in the string form provided by the resultsToString method.

Parameters:
expected - String form of the expected results
actual - String form of the actual results
Returns:
null if the String are identical or a description of the first difference if they are different


Copyright © 2009. All Rights Reserved.