use of com.ctrip.platform.dal.dao.configure.ConnectionString in project dal by ctripcorp.
the class PropertyFileConnectionStringProvider method getConnectionStrings.
@Override
public Map<String, DalConnectionString> getConnectionStrings(Set<String> names) throws Exception {
if (names == null || names.isEmpty())
return null;
Map<String, DalConnectionString> map = new HashMap<>();
for (String name : names) {
StringBuilder sb = new StringBuilder();
sb.append(properties.getProperty(name + USER_NAME));
sb.append(COMMA);
sb.append(properties.getProperty(name + PASSWORD));
sb.append(COMMA);
sb.append(properties.getProperty(name + CONNECTION_URL));
sb.append(COMMA);
sb.append(properties.getProperty(name + DRIVER_CLASS_NAME));
DalConnectionString connectionString = new ConnectionString(name, sb.toString(), sb.toString());
map.put(name, connectionString);
}
return map;
}
Aggregations