public static DropType getDropTypeToGenerate(String objectType) {
    String baseKey = "workbench.dbexplorer.generate.drop";

    String type = Settings.getInstance().getProperty(baseKey, DropType.cascaded.name());

    if (objectType != null && !"default".equalsIgnoreCase(objectType)) {
      type =
          Settings.getInstance()
              .getProperty(baseKey + "." + DbSettings.getKeyValue(objectType), type);
    }

    // migrate from the old setting (true/false)
    if ("true".equalsIgnoreCase(type)) {
      return DropType.cascaded;
    }

    if ("false".equalsIgnoreCase(type)) {
      return DropType.none;
    }

    try {
      return DropType.valueOf(type);
    } catch (Exception ex) {
      return DropType.cascaded;
    }
  }
 /**
  * Return a list of object types for which the DbExplorer should not confirm the execution from
  * within the "Source" panel.
  */
 public static Set<String> objectTypesToRunWithoutConfirmation() {
   List<String> types =
       Settings.getInstance().getListProperty("workbench.dbexplorer.exec.noconfirm.types", false);
   Set<String> result = CollectionUtil.caseInsensitiveSet();
   result.addAll(types);
   return result;
 }
 public static void setShowFocusInDbExplorer(boolean flag) {
   Settings.getInstance().setProperty("workbench.gui.dbobjects.showfocus", flag);
 }
 public static void setUseFilterForRetrieve(boolean flag) {
   Settings.getInstance().setProperty(PROP_USE_FILTER_RETRIEVE, flag);
 }
 public static void setAllowAlterInDbExplorer(boolean flag) {
   Settings.getInstance().setProperty(PROP_ALLOW_ALTER_TABLE, flag);
 }
 public static boolean allowSourceEditing() {
   return Settings.getInstance().getBoolProperty(PROP_ALLOW_SOURCE_EDITING, false);
 }
 public static boolean showSynonymTargetInDbExplorer() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.synonyms.showtarget", true);
 }
 public static boolean useNaturalSort() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.sort.natural", true);
 }
 /**
  * Indicate if the column order in the DbExplorer's Data tab should be remembered across restarts
  */
 public static boolean getRememberColumnOrder() {
   return Settings.getInstance()
       .getBoolProperty("workbench.dbexplorer.remember.columnorder", false);
 }
 /** Set if the column order in the DbExplorer's Data tab should be remembered across restarts */
 public static void setRememberColumnOrder(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.remember.columnorder", flag);
 }
 public static boolean getRememberSortInDbExplorer() {
   return Settings.getInstance().getBoolProperty(PROPERTY_DBEXP_REMEMBER_SORT, false);
 }
 public static void setRememberSortInDbExplorer(boolean flag) {
   Settings.getInstance().setProperty(PROPERTY_DBEXP_REMEMBER_SORT, flag);
 }
 public static boolean showFocusInDbExplorer() {
   return Settings.getInstance().getBoolProperty("workbench.gui.dbobjects.showfocus", false);
 }
 /**
  * Control if the column order of tables displaying meta data (table list, procedures) should be
  * saved in the workspace
  *
  * @param tableType the table for which the column order should be checked (e.g. tablelist)
  * @param flag
  */
 public static void setRememberMetaColumnOrder(String tableType, boolean flag) {
   Settings.getInstance()
       .setProperty("workbench.dbexplorer." + tableType + ".remember.columnorder", flag);
 }
 /**
  * Indicate if the column order of tables displaying meta data (table list, procedures) should be
  * saved in the workspace
  *
  * @param tableType the table for which the column order should be checked (e.g. tablelist)
  */
 public static boolean getRememberMetaColumnOrder(String tableType) {
   return Settings.getInstance()
       .getBoolProperty("workbench.dbexplorer." + tableType + ".remember.columnorder", true);
 }
 public static boolean getGenerateScriptSeparator() {
   return Settings.getInstance()
       .getBoolProperty("workbench.dbexplorer.sqlscript.separator", false);
 }
 public static void setGenerateScriptSeparator(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.sqlscript.separator", flag);
 }
 public static void setStoreExplorerObjectType(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.rememberObjectType", flag);
 }
 public static boolean showApplyDDLHint() {
   return Settings.getInstance().getBoolProperty("workbench.gui.apply.ddl.hint", true);
 }
 public static boolean getStoreExplorerObjectType() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.rememberObjectType", false);
 }
 public static void setShowSynonymTargetInDbExplorer(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.synonyms.showtarget", flag);
 }
 public static boolean getSwitchCatalogInExplorer() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.switchcatalog", true);
 }
 public static void setAllowSourceEditing(boolean flag) {
   Settings.getInstance().setProperty(PROP_ALLOW_SOURCE_EDITING, flag);
 }
 public static boolean getSelectSourcePanelAfterRetrieve() {
   return Settings.getInstance()
       .getBoolProperty("workbench.gui.dbobjects.autoselectsrcpanel", true);
 }
 public static boolean allowAlterInDbExplorer() {
   return Settings.getInstance().getBoolProperty(PROP_ALLOW_ALTER_TABLE, false);
 }
 public static void setSelectSourcePanelAfterRetrieve(boolean flag) {
   Settings.getInstance().setProperty("workbench.gui.dbobjects.autoselectsrcpanel", flag);
 }
 public static boolean getUseFilterForRetrieve() {
   return Settings.getInstance().getBoolProperty(PROP_USE_FILTER_RETRIEVE, false);
 }
 public static boolean getAutoRetrieveFKTree() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.fktree.autoload", true);
 }
 public static boolean getApplySQLSortInDbExplorer() {
   return Settings.getInstance().getBoolProperty(PROP_USE_SQLSORT, false);
 }
 public static void setAutoRetrieveFKTree(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.fktree.autoload", flag);
 }