Example #1
0
  @Override
  public String getDetails() {
    StringBuffer b = new StringBuffer();
    b.append(connectionKeyProvider.getType());
    b.append('[').append(EnvMappedKey).append("='").append(environment).append("' ");
    b.append(SidMappedKey).append("='").append(sid).append("' ");
    b.append(SchemaMappedKey).append("='").append(schema).append("']");

    return b.toString();
  }
Example #2
0
  public DatabaseTarget(String environment, String sid, String schema) {
    this.environment = environment;
    this.schema = schema;
    this.sid = sid;

    PropertiesProvider propertiesProvider = RemindContext.getInstance().getPropertiesProvider();

    Map<String, String> lookupkeyMapping = new HashMap<String, String>();
    lookupkeyMapping.put(EnvMappedKey, environment);
    lookupkeyMapping.put(SidMappedKey, sid);

    Properties connectionProperties =
        propertiesProvider.getProperties(connectionKeyProvider.getLookupId(lookupkeyMapping));
    jdbcUrl = connectionProperties.getProperty(JdbcUrl, "");
    jdbcDriver = connectionProperties.getProperty(JdbcDriver, "");
    validationStatement = connectionProperties.getProperty(ValidationStatement, "");

    lookupkeyMapping.put(SchemaMappedKey, schema);

    Properties schemaProperties =
        propertiesProvider.getProperties(schemaKeyProvider.getLookupId(lookupkeyMapping));
    user = schemaProperties.getProperty(User, "");
    password = schemaProperties.getProperty(Password, "");
  }