コード例 #1
0
  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;
    }
  }
コード例 #2
0
 /**
  * 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;
 }
コード例 #3
0
 public static void setShowFocusInDbExplorer(boolean flag) {
   Settings.getInstance().setProperty("workbench.gui.dbobjects.showfocus", flag);
 }
コード例 #4
0
 public static void setUseFilterForRetrieve(boolean flag) {
   Settings.getInstance().setProperty(PROP_USE_FILTER_RETRIEVE, flag);
 }
コード例 #5
0
 public static void setAllowAlterInDbExplorer(boolean flag) {
   Settings.getInstance().setProperty(PROP_ALLOW_ALTER_TABLE, flag);
 }
コード例 #6
0
 public static boolean allowSourceEditing() {
   return Settings.getInstance().getBoolProperty(PROP_ALLOW_SOURCE_EDITING, false);
 }
コード例 #7
0
 public static boolean showSynonymTargetInDbExplorer() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.synonyms.showtarget", true);
 }
コード例 #8
0
 public static boolean useNaturalSort() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.sort.natural", true);
 }
コード例 #9
0
 /**
  * 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);
 }
コード例 #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);
 }
コード例 #11
0
 public static boolean getRememberSortInDbExplorer() {
   return Settings.getInstance().getBoolProperty(PROPERTY_DBEXP_REMEMBER_SORT, false);
 }
コード例 #12
0
 public static void setRememberSortInDbExplorer(boolean flag) {
   Settings.getInstance().setProperty(PROPERTY_DBEXP_REMEMBER_SORT, flag);
 }
コード例 #13
0
 public static boolean showFocusInDbExplorer() {
   return Settings.getInstance().getBoolProperty("workbench.gui.dbobjects.showfocus", false);
 }
コード例 #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);
 }
コード例 #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);
 }
コード例 #16
0
 public static boolean getGenerateScriptSeparator() {
   return Settings.getInstance()
       .getBoolProperty("workbench.dbexplorer.sqlscript.separator", false);
 }
コード例 #17
0
 public static void setGenerateScriptSeparator(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.sqlscript.separator", flag);
 }
コード例 #18
0
 public static void setStoreExplorerObjectType(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.rememberObjectType", flag);
 }
コード例 #19
0
 public static boolean showApplyDDLHint() {
   return Settings.getInstance().getBoolProperty("workbench.gui.apply.ddl.hint", true);
 }
コード例 #20
0
 public static boolean getStoreExplorerObjectType() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.rememberObjectType", false);
 }
コード例 #21
0
 public static void setShowSynonymTargetInDbExplorer(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.synonyms.showtarget", flag);
 }
コード例 #22
0
 public static boolean getSwitchCatalogInExplorer() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.switchcatalog", true);
 }
コード例 #23
0
 public static void setAllowSourceEditing(boolean flag) {
   Settings.getInstance().setProperty(PROP_ALLOW_SOURCE_EDITING, flag);
 }
コード例 #24
0
 public static boolean getSelectSourcePanelAfterRetrieve() {
   return Settings.getInstance()
       .getBoolProperty("workbench.gui.dbobjects.autoselectsrcpanel", true);
 }
コード例 #25
0
 public static boolean allowAlterInDbExplorer() {
   return Settings.getInstance().getBoolProperty(PROP_ALLOW_ALTER_TABLE, false);
 }
コード例 #26
0
 public static void setSelectSourcePanelAfterRetrieve(boolean flag) {
   Settings.getInstance().setProperty("workbench.gui.dbobjects.autoselectsrcpanel", flag);
 }
コード例 #27
0
 public static boolean getUseFilterForRetrieve() {
   return Settings.getInstance().getBoolProperty(PROP_USE_FILTER_RETRIEVE, false);
 }
コード例 #28
0
 public static boolean getAutoRetrieveFKTree() {
   return Settings.getInstance().getBoolProperty("workbench.dbexplorer.fktree.autoload", true);
 }
コード例 #29
0
 public static boolean getApplySQLSortInDbExplorer() {
   return Settings.getInstance().getBoolProperty(PROP_USE_SQLSORT, false);
 }
コード例 #30
0
 public static void setAutoRetrieveFKTree(boolean flag) {
   Settings.getInstance().setProperty("workbench.dbexplorer.fktree.autoload", flag);
 }