## org.eclipse.datatools.sqltools.result.internal.ui.view
Class ColumnAlignedResultItem

    java.lang.Object
      org.eclipse.datatools.sqltools.result.internal.ui.view.ColumnAlignedResultItem

    public class ColumnAlignedResultItem

extends java.lang.Object

When using single window text display mode, we use this class to generate the display string.

Author:
  Dafan Yang

Field Summary
`static int` `PARAM_DATA_TYPE`
`static java.lang.String[]` `PARAM_HEADING`
`static int` `PARAM_NAME`
`static int` `PARAM_TYPE`
`static int` `PARAM_VALUE`
`static int` `PARAM_VALUE_OUT`

Constructor Summary
`ColumnAlignedResultItem()`

Method Summary
`static java.lang.String` `getDisplayData(IResultSetObject result, IResultSetRow row, java.lang.String nullValue)` Returns the display data of the given row
`static java.lang.String` `getLineSeparator()` Returns the platform independent line separator
`static java.lang.String` `getParametersDsipalyStr(java.util.List params, java.lang.String nullValue)` Returns the display string of the given parameters (column aligned)
`static java.lang.String` `getResultInstanceDispString(IResultInstance instance, java.lang.String nullValue)` Returns the display string of the whole result instance to for saving purpose
`static java.lang.String` `getResultItemDisplayString(ResultItem item, java.lang.String nullValue, boolean showHeading, boolean showRowCountMsg)` Returns the item's display string when using text mode.
`static java.lang.String` `getResultSetDisplayString(IResultSetObject rs, java.lang.String nullValue, boolean showHeading, boolean showRowCountMsg)` Returns the result set's display string when using text mode.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PARAM_NAME

    public static final int PARAM_NAME

See Also:
  Constant Field Values

### PARAM_TYPE

    public static final int PARAM_TYPE

See Also:
  Constant Field Values

### PARAM_DATA_TYPE

    public static final int PARAM_DATA_TYPE

See Also:
  Constant Field Values

### PARAM_VALUE

    public static final int PARAM_VALUE

See Also:
  Constant Field Values

### PARAM_VALUE_OUT

    public static final int PARAM_VALUE_OUT

See Also:
  Constant Field Values

### PARAM_HEADING

    public static final java.lang.String[] PARAM_HEADING

Constructor Detail

### ColumnAlignedResultItem

    public ColumnAlignedResultItem()

Method Detail

### getResultItemDisplayString

    public static java.lang.String getResultItemDisplayString(ResultItem item,
                                                              java.lang.String nullValue,
                                                              boolean showHeading,
                                                              boolean showRowCountMsg)

  Returns the item's display string when using text mode. If current item's type is OUTPUTTEXT or UPDATECOUNT, param nullValue and showHeading make no sense

  Parameters:
    `item` - the result item
    `nullValue` - when the value is NULL, display nullValue
    `showHeading` - whether display the column headings or not
    `showRowCountMsg` - whether display the row count message or not
  Returns:
    the string to display

### getResultSetDisplayString

    public static java.lang.String getResultSetDisplayString(IResultSetObject rs,
                                                             java.lang.String nullValue,
                                                             boolean showHeading,
                                                             boolean showRowCountMsg)

  Returns the result set's display string when using text mode.

  Parameters:
    `rs` - the result set object
    `nullValue` - when the value is NULL, display nullValue
    `showHeading` - whether display the column headings or not
    `showRowCountMsg` - whether display the row count message or not
  Returns:
    the display string for this result set

### getDisplayData

    public static java.lang.String getDisplayData(IResultSetObject result,
                                                  IResultSetRow row,
                                                  java.lang.String nullValue)

  Returns the display data of the given row

  Parameters:
    `result` -
    `row` -
  Returns:

### getLineSeparator

    public static java.lang.String getLineSeparator()

  Returns the platform independent line separator

  Returns:
    the platform independent line separator

### getParametersDsipalyStr

    public static java.lang.String getParametersDsipalyStr(java.util.List params,
                                                           java.lang.String nullValue)

  Returns the display string of the given parameters (column aligned)

  Parameters:
    `params` - the given parameter list
    `nullValue` - the display string for null value
  Returns:
    the display string for the given parameters

### getResultInstanceDispString

    public static java.lang.String getResultInstanceDispString(IResultInstance instance,
                                                               java.lang.String nullValue)

  Returns the display string of the whole result instance to for saving purpose

  Parameters:
    `instance` - the given result instance
    `nullValue` - the display string for null value
  Returns:
    the display string of the whole result instance to for saving purpose