package com.uas.platform.b2b.data.support;

public class DS {

	private static final String defaultDriver = "oracle.jdbc.driver.OracleDriver";

	private String id;
	private String driverClassName;
	private String url;
	private String host;
	private Integer port;
	private String username;
	private String password;

	public String getDriverClassName() {
		return driverClassName == null ? defaultDriver : driverClassName;
	}

	public void setDriverClassName(String driverClassName) {
		this.driverClassName = driverClassName;
	}

	public String getUrl() {
		return url == null ? String.format("jdbc:oracle:thin:@//%s:%s/orcl", getHost(), getPort()) : url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

}
