org.eclipse.datatools.sqltools.result.internal.ui.view
Class ResultHistoryHelper

java.lang.Object
  extended by org.eclipse.datatools.sqltools.result.internal.ui.view.ResultHistoryHelper

public class ResultHistoryHelper
extends java.lang.Object

Result history related utilities

Author:
Dafan Yang

Field Summary
static int ACTION_INDEX
           
static java.lang.String[] COLUMN_NAME
           
static java.util.Map COLUMN_NAME_PREFERENCE_MAP
           
static int COLUMN_NUMBER
           
static java.lang.String[] COLUMN_PREFERENCE
           
static java.util.Map COLUMN_PREFERENCE_INDEX_MAP
           
static java.util.Map COLUMN_PREFERENCE_ORDER_MAP
           
static int CONSUMER_INDEX
           
static int DATE_INDEX
           
static int FREQ_INDEX
           
static int OPER_INDEX
           
static int PROFILE_INDEX
           
static int STATUS_INDEX
           
 
Constructor Summary
ResultHistoryHelper()
           
 
Method Summary
static int getColumnNumber(boolean usePreference)
          Returns the total column number need to be displayed
static int getConfigurableColumnIndex(int order, boolean usePreference)
          Returns the configurable column index at the given display index
static int getConfigurableColumnIndex(java.lang.String columnName)
          Returns the configurable column index based on the column name
static void refreshOrderFromPreference(boolean usePreference)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_NUMBER

public static final int COLUMN_NUMBER
See Also:
Constant Field Values

STATUS_INDEX

public static final int STATUS_INDEX
See Also:
Constant Field Values

OPER_INDEX

public static final int OPER_INDEX
See Also:
Constant Field Values

FREQ_INDEX

public static final int FREQ_INDEX
See Also:
Constant Field Values

DATE_INDEX

public static final int DATE_INDEX
See Also:
Constant Field Values

ACTION_INDEX

public static final int ACTION_INDEX
See Also:
Constant Field Values

CONSUMER_INDEX

public static final int CONSUMER_INDEX
See Also:
Constant Field Values

PROFILE_INDEX

public static final int PROFILE_INDEX
See Also:
Constant Field Values

COLUMN_PREFERENCE_INDEX_MAP

public static final java.util.Map COLUMN_PREFERENCE_INDEX_MAP

COLUMN_PREFERENCE_ORDER_MAP

public static final java.util.Map COLUMN_PREFERENCE_ORDER_MAP

COLUMN_NAME_PREFERENCE_MAP

public static final java.util.Map COLUMN_NAME_PREFERENCE_MAP

COLUMN_PREFERENCE

public static java.lang.String[] COLUMN_PREFERENCE

COLUMN_NAME

public static java.lang.String[] COLUMN_NAME
Constructor Detail

ResultHistoryHelper

public ResultHistoryHelper()
Method Detail

refreshOrderFromPreference

public static void refreshOrderFromPreference(boolean usePreference)

getConfigurableColumnIndex

public static int getConfigurableColumnIndex(int order,
                                             boolean usePreference)
Returns the configurable column index at the given display index

Parameters:
order - the display index
usePreference - whether to use the preference or the default for the preference
Returns:
the configurable column index (There are 7 colums altogether)

getConfigurableColumnIndex

public static int getConfigurableColumnIndex(java.lang.String columnName)
Returns the configurable column index based on the column name

Parameters:
columnName - the column name
Returns:
the configurable column index (There are 7 colums altogether)

getColumnNumber

public static int getColumnNumber(boolean usePreference)
Returns the total column number need to be displayed

Parameters:
usePreference - whether to use the preference or the default preference
Returns:
the total column number need to be displayed