public String getUrl() {
    StringBuilder url = new StringBuilder(100);
    url.append("jdbc:postgresql://");
    url.append(serverName);
    if (portNumber != 0) {
      url.append(":").append(portNumber);
    }
    url.append("/").append(URLCoder.encode(databaseName));

    StringBuilder query = new StringBuilder(100);
    for (PGProperty property : PGProperty.values()) {
      if (property.isPresent(properties)) {
        if (query.length() != 0) {
          query.append("&");
        }
        query.append(property.getName());
        query.append("=");
        query.append(URLCoder.encode(property.get(properties)));
      }
    }

    if (query.length() > 0) {
      url.append("?");
      url.append(query);
    }

    return url.toString();
  }
public String getUrl ( ) { StringBuilder url = new StringBuilder ( 100 ) ; url . append ( "jdbc:postgresql://" ) ; url . append ( serverName ) ; if ( portNumber != 0 ) { url . append ( ":" ) . append ( portNumber ) ; } url . append ( "/" ) . append ( URLCoder . encode ( databaseName ) ) ; StringBuilder query = new StringBuilder ( 100 ) ; for ( PGProperty property : PGProperty . values ( ) ) { if ( property . isPresent ( properties ) ) { if ( query . length ( ) != 0 ) { query . append ( "&" ) ; } query . append ( property . getName ( ) ) ; query . append ( "=" ) ; query . append ( URLCoder . encode ( property . get ( properties ) ) ) ; } } if ( query . length ( ) > 0 ) { url . append ( "?" ) ; url . append ( query ) ; } return url . toString ( ) ; }
Generates a {@link DriverManager} URL from the other properties supplied.

@return {@link DriverManager} URL from the other properties supplied