Interface IJdbcConnectionProvider2

All Superinterfaces:
IJdbcConnectionProvider
All Known Implementing Classes:
AbstractJdbcConnectionProvider, HyperSqlFileJdbcConnectionProvider, HyperSqlServerJdbcConnectionProvider, MySql5JdbcConnectionProvider

public interface IJdbcConnectionProvider2 extends IJdbcConnectionProvider
Enhanced IJdbcConnectionProvider which allows more control on connection provider settings.
Author:
ralph
  • Method Details

    • getHost

      String getHost(String s)
      Returns the host argument to be used for URL construction. Descendants can override this method when they have more sophisticated algorithms to determine the host argument. This implementation returns the default host when the passed string is either empty or host argument was disabled.
      Parameters:
      s - the string containing an actual host argument
      Returns:
      the argument to be used in URL construction
      See Also:
    • isHostEnabled

      boolean isHostEnabled()
      Returns whether host argument is enabled. The information can be used for UI developers to control the input flow.
      Returns:
      true when host argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setHostEnabled

      void setHostEnabled(boolean b)
      Sets whether host argument is enabled. The information can be used for UI developers to control the input flow.
      Parameters:
      b - true when host argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setHost

      void setHost(boolean enabled, String defaultValue)
      Parameters:
      enabled - whether to enable host argument
      defaultValue - the default value
    • getDefaultHost

      String getDefaultHost()
      Returns the default host argument to be used when host argument is disabled or actual value is empty.
      Returns:
      default value
    • setDefaultHost

      void setDefaultHost(String s)
      Sets the default host argument to be used when host argument is disabled or actual value is empty.
      Parameters:
      s - default value
    • getPort

      String getPort(String s)
      Returns the port argument to be used for URL construction. Descendants can override this method when they have more sophisticated algorithms to determine the port argument. This implementation returns the default port when the passed string is either empty or port argument was disabled.
      Parameters:
      s - the string containing an actual port argument
      Returns:
      the argument to be used in URL construction
      See Also:
    • isPortEnabled

      boolean isPortEnabled()
      Returns whether port argument is enabled. The information can be used for UI developers to control the input flow.
      Returns:
      true when port argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setPortEnabled

      void setPortEnabled(boolean b)
      Sets whether port argument is enabled. The information can be used for UI developers to control the input flow.
      Parameters:
      b - true when port argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setPort

      void setPort(boolean enabled, String defaultValue)
      Parameters:
      enabled - whether to enable port argument
      defaultValue - the default value
    • getDefaultPort

      String getDefaultPort()
      Returns the default port argument to be used when port argument is disabled or actual value is empty.
      Returns:
      default value
    • setDefaultPort

      void setDefaultPort(String s)
      Sets the default port argument to be used when port argument is disabled or actual value is empty.
      Parameters:
      s - default value
    • getDbName

      String getDbName(String s)
      Returns the DB name argument to be used for URL construction. Descendants can override this method when they have more sophisticated algorithms to determine the DB name argument. This implementation returns the default DB name when the passed string is either empty or DB name argument was disabled.
      Parameters:
      s - the string containing an actual DB name argument
      Returns:
      the argument to be used in URL construction
      See Also:
    • isDbNameEnabled

      boolean isDbNameEnabled()
      Returns whether DB name argument is enabled. The information can be used for UI developers to control the input flow.
      Returns:
      true when dbName argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setDbNameEnabled

      void setDbNameEnabled(boolean b)
      Sets whether DB name argument is enabled. The information can be used for UI developers to control the input flow.
      Parameters:
      b - true when dbName argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setDbName

      void setDbName(boolean enabled, String defaultValue)
      Parameters:
      enabled - whether to enable DB name argument
      defaultValue - the default value
    • getDefaultDbName

      String getDefaultDbName()
      Returns the default DB name argument to be used when DB name argument is disabled or actual value is empty.
      Returns:
      default value
    • setDefaultDbName

      void setDefaultDbName(String s)
      Sets the default DB name argument to be used when DB name argument is disabled or actual value is empty.
      Parameters:
      s - default value
    • getDbLogin

      String getDbLogin(String s)
      Returns the DB login argument to be used for URL construction. Descendants can override this method when they have more sophisticated algorithms to determine the DB login argument. This implementation returns the default DB login when the passed string is either empty or DB login argument was disabled.
      Parameters:
      s - the string containing an actual DB login argument
      Returns:
      the argument to be used in URL construction
      See Also:
    • isDbLoginEnabled

      boolean isDbLoginEnabled()
      Returns whether DB login argument is enabled. The information can be used for UI developers to control the input flow.
      Returns:
      true when dbLogin argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setDbLoginEnabled

      void setDbLoginEnabled(boolean b)
      Sets whether DB login argument is enabled. The information can be used for UI developers to control the input flow.
      Parameters:
      b - true when dbLogin argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setDbLogin

      void setDbLogin(boolean enabled, String defaultValue)
      Parameters:
      enabled - whether to enable DB login argument
      defaultValue - the default value
    • getDefaultDbLogin

      String getDefaultDbLogin()
      Returns the default DB login argument to be used when DB login argument is disabled or actual value is empty.
      Returns:
      default value
    • setDefaultDbLogin

      void setDefaultDbLogin(String s)
      Sets the default DB login argument to be used when DB login argument is disabled or actual value is empty.
      Parameters:
      s - default value
    • getDbPassword

      String getDbPassword(String s)
      Returns the DB password argument to be used for URL construction. Descendants can override this method when they have more sophisticated algorithms to determine the DB password argument. This implementation returns the default DB password when the passed string is either empty or DB password argument was disabled.
      Parameters:
      s - the string containing an actual DB password argument
      Returns:
      the argument to be used in URL construction
      See Also:
    • isDbPasswordEnabled

      boolean isDbPasswordEnabled()
      Returns whether DB password argument is enabled. The information can be used for UI developers to control the input flow.
      Returns:
      true when dbPassword argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setDbPasswordEnabled

      void setDbPasswordEnabled(boolean b)
      Sets whether DB password argument is enabled. The information can be used for UI developers to control the input flow.
      Parameters:
      b - true when dbPassword argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setDbPassword

      void setDbPassword(boolean enabled, String defaultValue)
      Parameters:
      enabled - whether to enable DB password argument
      defaultValue - the default value
    • getDefaultDbPassword

      String getDefaultDbPassword()
      Returns the default DB password argument to be used when DB password argument is disabled or actual value is empty.
      Returns:
      default value
    • setDefaultDbPassword

      void setDefaultDbPassword(String s)
      Sets the default DB password argument to be used when DB password argument is disabled or actual value is empty.
      Parameters:
      s - default value
    • getAdditionalArgument

      String getAdditionalArgument(int index, String s)
      Returns the additional argument to be used for URL construction. Descendants can override this method when they have more sophisticated algorithms to determine the additional argument. This implementation returns the default additional argument when the passed string is either empty or the additional argument was disabled.
      Parameters:
      index - index of additional argument
      s - the string containing an actual additional argument
      Returns:
      the argument to be used in URL construction
      See Also:
    • isAdditionalArgumentEnabled

      boolean isAdditionalArgumentEnabled(int index)
      Returns whether additional argument is enabled. The information can be used for UI developers to control the input flow.
      Parameters:
      index - index of additional argument
      Returns:
      true when additional argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setAdditionalArgumentEnabled

      void setAdditionalArgumentEnabled(int index, boolean b)
      Sets whether additional argument is enabled. The information can be used for UI developers to control the input flow.
      Parameters:
      index - index of additional argument
      b - true when additional argument can be passed to IJdbcConnectionProvider.getConnection(String, String, String, String, String, String...)
    • setAdditionalArgument

      void setAdditionalArgument(int index, String name, boolean enabled, String defaultValue)
      Parameters:
      index - index of additional argument
      enabled - whether to enable additional argument
      name - name of additional argument
      defaultValue - the default value
    • getDefaultAdditionalArgument

      String getDefaultAdditionalArgument(int index)
      Returns the default additional argument to be used when it is disabled or actual value is empty.
      Parameters:
      index - index of additional argument
      Returns:
      default value
    • setDefaultAdditionalArgument

      void setDefaultAdditionalArgument(int index, String s)
      Sets the default additional argument to be used when it is disabled or actual value is empty.
      Parameters:
      index - index of additional argument
      s - default value
    • getAdditionalArgumentName

      String getAdditionalArgumentName(int index)
      Returns the name of the additional argument. The name can be used for labels.
      Parameters:
      index - index of argument
      Returns:
      name of argument
    • setAdditionalArgumentName

      void setAdditionalArgumentName(int index, String s)
      Sets the name of the additional argument. The name can be used for labels.
      Parameters:
      index - index of argument
      s - name of argument
    • getAdditionalArgumentNames

      String[] getAdditionalArgumentNames()
      Returns the names of additional arguments.
      Returns:
      array of names in order (array is empty when no additional arguments are used)
    • getAdditionalArgumentCount

      int getAdditionalArgumentCount()
      Returns the number of additional arguments this provider knows about.
      Returns:
      number of additional arguments
    • getDriverParameterCount

      int getDriverParameterCount()
      Returns the number of additional driver parameters.
      Returns:
      number of driver parameters.
      Since:
      1.2.9
    • setDriverParameter

      void setDriverParameter(String name, String value)
      Sets a driver parameter value or deletes it.
      Parameters:
      name - name of parameter
      value - value of parameter or null if parameter shall be removed
      Since:
      1.2.9
    • getDriverParameter

      String getDriverParameter(String name)
      Returns the value of th edriver parameter.
      Parameters:
      name - name of parameter
      Returns:
      value of parameter
      Since:
      1.2.9
    • getDriverParametersString

      String getDriverParametersString()
      Returns the URL driver parameter string to be used in url.
      Returns:
      the parameter string
      Since:
      1.2.9