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);
 }
Ejemplo n.º 10
0
 /** 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);
 }
Ejemplo n.º 11
0
 public static boolean getRememberSortInDbExplorer() {
   return Settings.getInstance().getBoolProperty(PROPERTY_DBEXP_REMEMBER_SORT, false);
 }
Ejemplo n.º 12
0
 public static void setRememberSortInDbExplorer(boolean flag) {
   Settings.getInstance().setProperty(PROPERTY_DBEXP_REMEMBER_SORT, flag);
 }
Ejemplo n.º 13
0
 public static boolean showFocusInDbExplorer() {
   return Settings.getInstance().getBoolProperty("workbench.gui.dbobjects.showfocus", false);
 }
Ejemplo n.º 14
0
 /**
  * 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);
 }
Ejemplo n.º 15
0
 /**
  * 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);
 }
Ejemplo n.º 16
0
 public static boolean getGenerateScriptSeparator() {
   return Settings.getInstance()
       .getBoolProperty("workbench.dbexplorer.sqlscript.separator", false);
 }
Ejemplo n.º 17
0
 public static void setGenerateScriptSeparator(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.sqlscript.separator", flag);
 }
Ejemplo n.º 18
0
 public static void setStoreExplorerObjectType(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.rememberObjectType", flag);
 }
Ejemplo n.º 19
0
 public static boolean showApplyDDLHint() {
   return Settings.getInstance().getBoolProperty("workbench.gui.apply.ddl.hint", true);
 }
Ejemplo n.º 20
0
 public static boolean getStoreExplorerObjectType() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.rememberObjectType", false);
 }
Ejemplo n.º 21
0
 public static void setShowSynonymTargetInDbExplorer(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.synonyms.showtarget", flag);
 }
Ejemplo n.º 22
0
 public static boolean getSwitchCatalogInExplorer() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.switchcatalog", true);
 }
Ejemplo n.º 23
0
 public static void setAllowSourceEditing(boolean flag) {
   Settings.getInstance().setProperty(PROP_ALLOW_SOURCE_EDITING, flag);
 }
Ejemplo n.º 24
0
 public static boolean getSelectSourcePanelAfterRetrieve() {
   return Settings.getInstance()
       .getBoolProperty("workbench.gui.dbobjects.autoselectsrcpanel", true);
 }
Ejemplo n.º 25
0
 public static boolean allowAlterInDbExplorer() {
   return Settings.getInstance().getBoolProperty(PROP_ALLOW_ALTER_TABLE, false);
 }
Ejemplo n.º 26
0
 public static void setSelectSourcePanelAfterRetrieve(boolean flag) {
   Settings.getInstance().setProperty("workbench.gui.dbobjects.autoselectsrcpanel", flag);
 }
Ejemplo n.º 27
0
 public static boolean getUseFilterForRetrieve() {
   return Settings.getInstance().getBoolProperty(PROP_USE_FILTER_RETRIEVE, false);
 }
Ejemplo n.º 28
0
 public static boolean getAutoRetrieveFKTree() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.fktree.autoload", true);
 }
Ejemplo n.º 29
0
 public static boolean getApplySQLSortInDbExplorer() {
   return Settings.getInstance().getBoolProperty(PROP_USE_SQLSORT, false);
 }
Ejemplo n.º 30
0
 public static void setAutoRetrieveFKTree(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.fktree.autoload", flag);
 }