## org.eclipse.datatools.sqltools.result.internal.ui.utils
Class PreferenceUtil

    java.lang.Object
      org.eclipse.datatools.sqltools.result.internal.ui.utils.PreferenceUtil

    public class PreferenceUtil

extends java.lang.Object

Utility class for preference handling

Author:
  Jeremy Lindop

Constructor Summary
`PreferenceUtil()`

Method Summary
`static boolean` `getBoolean(org.eclipse.jface.preference.IPreferenceStore store, java.lang.String preference, boolean usePreference)` Gets either a boolean preference setting from a preference store or gets the default boolean from the preference store, according to whether the `usePreference` parameter is set to true or false.
`static int` `getInt(org.eclipse.jface.preference.IPreferenceStore store, java.lang.String preference, boolean usePreference)` Gets either an int preference setting from a preference store or gets the default int from the preference store, according to whether the `usePreference` parameter is set to true or false.
`static java.lang.String` `getString(org.eclipse.jface.preference.IPreferenceStore store, java.lang.String preference, boolean usePreference)` Gets either a String preference setting from a preference store or gets the default String from the preference store, according to whether the `usePreference` parameter is set to true or false.

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

Constructor Detail

### PreferenceUtil

    public PreferenceUtil()

Method Detail

### getBoolean

    public static boolean getBoolean(org.eclipse.jface.preference.IPreferenceStore store,
                                     java.lang.String preference,
                                     boolean usePreference)

  Gets either a boolean preference setting from a preference store or gets the default boolean from the preference store, according to whether the `usePreference` parameter is set to true or false.

  Parameters:
    `store` - Preference store.
    `preference` - Preference constant.
    `usePreference` - True indicates the preference setting should be retrieved. False indicates the default should be retrieved.
  Returns:
    boolean preference value.

### getInt

    public static int getInt(org.eclipse.jface.preference.IPreferenceStore store,
                             java.lang.String preference,
                             boolean usePreference)

  Gets either an int preference setting from a preference store or gets the default int from the preference store, according to whether the `usePreference` parameter is set to true or false.

  Parameters:
    `store` - Preference store.
    `preference` - Preference constant.
    `usePreference` - True indicates the preference setting should be retrieved. False indicates the default should be retrieved.
  Returns:
    boolean preference value.

### getString

    public static java.lang.String getString(org.eclipse.jface.preference.IPreferenceStore store,
                                             java.lang.String preference,
                                             boolean usePreference)

  Gets either a String preference setting from a preference store or gets the default String from the preference store, according to whether the `usePreference` parameter is set to true or false.

  Parameters:
    `store` - Preference store.
    `preference` - Preference constant.
    `usePreference` - True indicates the preference setting should be retrieved. False indicates the default should be retrieved.
  Returns:
    boolean preference value.