You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
1.9 KiB
94 lines
1.9 KiB
package com.platform.entities;
|
|
|
|
import java.util.Properties;
|
|
|
|
import com.platform.utils.ConfigPropertyReader;
|
|
import com.platform.utils.Configs;
|
|
|
|
public class OracleConnectorParams {
|
|
private String port;
|
|
private String ip;
|
|
private String name;
|
|
private String user;
|
|
private String password;
|
|
private String databaseName;
|
|
|
|
public OracleConnectorParams() {
|
|
// TODO Auto-generated constructor stub
|
|
maybeInit();
|
|
}
|
|
|
|
public OracleConnectorParams(String port, String ip, String name) {
|
|
maybeInit();
|
|
this.port = port;
|
|
this.ip = ip;
|
|
this.name = name;
|
|
}
|
|
|
|
public OracleConnectorParams(String port, String ip, String name,
|
|
String user, String password, String database) {
|
|
this.port = port;
|
|
this.ip = ip;
|
|
this.name = name;
|
|
this.user = user;
|
|
this.password = password;
|
|
this.databaseName = database;
|
|
}
|
|
|
|
private void maybeInit() {
|
|
Properties properties = ConfigPropertyReader.Builder(
|
|
Configs.CONFIG_LOCALTION).getProperties();
|
|
this.user = properties.getProperty("collect-user-name");
|
|
this.password = properties.getProperty("collect-password");
|
|
this.databaseName = properties.getProperty("collect-service-name");
|
|
}
|
|
|
|
public String getPort() {
|
|
return port;
|
|
}
|
|
|
|
public void setPort(String port) {
|
|
this.port = port;
|
|
}
|
|
|
|
public String getIp() {
|
|
return ip;
|
|
}
|
|
|
|
public void setIp(String ip) {
|
|
this.ip = ip;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getUser() {
|
|
return user;
|
|
}
|
|
|
|
public void setUser(String user) {
|
|
this.user = user;
|
|
}
|
|
|
|
public String getPassword() {
|
|
return password;
|
|
}
|
|
|
|
public void setPassword(String password) {
|
|
this.password = password;
|
|
}
|
|
|
|
public String getDatabaseName() {
|
|
return databaseName;
|
|
}
|
|
|
|
public void setDatabaseName(String databaseName) {
|
|
this.databaseName = databaseName;
|
|
}
|
|
}
|