Code example for Properties

Methods: clone, put

0
    } 
 
    public Connection getConnection(final String username, final String password)
        throws SQLException 
    { 
      final Properties temp = (Properties) jdbcProperties.clone();
      if (username != null)
      { 
        temp.put("user", username);
      } 
      if (password != null)
      { 
        temp.put("password", password);
      } 
      return java.sql.DriverManager.getConnection(jdbcConnectString, temp);
    } 
 
    public PrintWriter getLogWriter() throws SQLException
    { 
      return logWriter;
    }