String server = row.get_locator();
Integer portNumber = row.get_port();
Port port = (portNumber != null) ? Port.valueOf(portNumber) : null;
String login = row.get_login();
String password = getPassword(row);
LdapSecurityLevel secure = getSecurityLevel(row);
return new LdapConnectionInfo(server, port, login, password, secure);
} catch (SQLException ex) {
throw new LdapException("Failed to create LdapConnectionInfo from the source with id " + id, ex);
} catch (NullPointerException ex) {
handleInvalidData("source", id);