com.jn.sqlhelper.common.connection.NamedConnectionConfiguration Maven / Gradle / Ivy
package com.jn.sqlhelper.common.connection;
import com.jn.easyjson.core.util.JSONs;
import com.jn.langx.configuration.Configuration;
import com.jn.langx.util.Objs;
import com.jn.langx.util.collection.Collects;
import com.jn.langx.util.collection.diff.MapDiffResult;
import com.jn.langx.util.function.Consumer2;
import java.util.Map;
import java.util.Properties;
public class NamedConnectionConfiguration extends ConnectionConfiguration implements Configuration, Cloneable {
private String name;
public NamedConnectionConfiguration() {
}
public NamedConnectionConfiguration(ConnectionConfiguration configuration) {
setDriver(configuration.getDriver());
setUser(configuration.getUser());
setPassword(configuration.getPassword());
setUrl(configuration.getUrl());
final Properties props = new Properties();
Collects.forEach(configuration.getDriverProps(), new Consumer2