this.targetId = targetId;
}
public ConnectionParams getParams() throws ServerDbException {
try {
TargetsTabRow row = getDefinition();
if (row == null) {
throw new ServerDbException("Could not find the deployed definition of the Target with GUID "
+ targetId);
}
ConnectionParams params = new ConnectionParams();
params.setServer(row.get_locator())
.setDatabase(row.get_dbname())
.setUser(row.get_login())
.setPassword(decryptPassword(row.get_password()))
.setPort(Port.valueOf(row.get_port()))
.setDriverName(row.get_driver())
.setTransactionIsolationLevel(getTransactionIsolationLevel(row))
.setManualConnectionString(row.get_connectstring())
.setAdditionalParams(row.get_optional_connectstring());
return params;
} catch (SQLException ex) {
throw new ServerDbException(ex.getMessage(), ex);
}
}