package com.qianwen.smartman.modules.cps.vo;
|
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
import java.io.Serializable;
|
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.stereotype.Component;
|
|
@ApiModel(description = "配置信息")
|
@Component
|
public class ConfigVO implements Serializable {
|
@Value("${oss.endpoint}")
|
@ApiModelProperty(name = "ossUrl")
|
private String ossUrl;
|
@Value("${oss.access-key}")
|
@ApiModelProperty("access-key")
|
private String accessKey;
|
@Value("${oss.secret-key}")
|
@ApiModelProperty("secret-key")
|
private String secretKey;
|
@Value("${spring.datasource.dynamic.datasource.tdengine.url}")
|
@ApiModelProperty("tdengine配置")
|
private String tdengineUrl;
|
@Value("${spring.datasource.dynamic.datasource.master.url}")
|
@ApiModelProperty("数据库配置")
|
private String mysqlUrl;
|
@Value("${datasource.driver-class-name}")
|
@ApiModelProperty("驱动")
|
private String driverClassName;
|
@Value("${datasource.database}")
|
@ApiModelProperty("数据库名")
|
private String database;
|
@Value("${datasource.type}")
|
@ApiModelProperty("数据库类型")
|
private String type;
|
@Value("${datasource.url}")
|
@ApiModelProperty("ip")
|
private String url;
|
|
public static class ConfigVOBuilder {
|
private String ossUrl;
|
private String accessKey;
|
private String secretKey;
|
private String tdengineUrl;
|
private String mysqlUrl;
|
private String driverClassName;
|
private String database;
|
private String type;
|
private String url;
|
|
ConfigVOBuilder() {
|
}
|
|
public ConfigVOBuilder ossUrl(final String ossUrl) {
|
this.ossUrl = ossUrl;
|
return this;
|
}
|
|
public ConfigVOBuilder accessKey(final String accessKey) {
|
this.accessKey = accessKey;
|
return this;
|
}
|
|
public ConfigVOBuilder secretKey(final String secretKey) {
|
this.secretKey = secretKey;
|
return this;
|
}
|
|
public ConfigVOBuilder tdengineUrl(final String tdengineUrl) {
|
this.tdengineUrl = tdengineUrl;
|
return this;
|
}
|
|
public ConfigVOBuilder mysqlUrl(final String mysqlUrl) {
|
this.mysqlUrl = mysqlUrl;
|
return this;
|
}
|
|
public ConfigVOBuilder driverClassName(final String driverClassName) {
|
this.driverClassName = driverClassName;
|
return this;
|
}
|
|
public ConfigVOBuilder database(final String database) {
|
this.database = database;
|
return this;
|
}
|
|
public ConfigVOBuilder type(final String type) {
|
this.type = type;
|
return this;
|
}
|
|
public ConfigVOBuilder url(final String url) {
|
this.url = url;
|
return this;
|
}
|
|
public ConfigVO build() {
|
return new ConfigVO(this.ossUrl, this.accessKey, this.secretKey, this.tdengineUrl, this.mysqlUrl, this.driverClassName, this.database, this.type, this.url);
|
}
|
|
public String toString() {
|
return "ConfigVO.ConfigVOBuilder(ossUrl=" + this.ossUrl + ", accessKey=" + this.accessKey + ", secretKey=" + this.secretKey + ", tdengineUrl=" + this.tdengineUrl + ", mysqlUrl=" + this.mysqlUrl + ", driverClassName=" + this.driverClassName + ", database=" + this.database + ", type=" + this.type + ", url=" + this.url + ")";
|
}
|
}
|
|
public void setOssUrl(final String ossUrl) {
|
this.ossUrl = ossUrl;
|
}
|
|
public void setAccessKey(final String accessKey) {
|
this.accessKey = accessKey;
|
}
|
|
public void setSecretKey(final String secretKey) {
|
this.secretKey = secretKey;
|
}
|
|
public void setTdengineUrl(final String tdengineUrl) {
|
this.tdengineUrl = tdengineUrl;
|
}
|
|
public void setMysqlUrl(final String mysqlUrl) {
|
this.mysqlUrl = mysqlUrl;
|
}
|
|
public void setDriverClassName(final String driverClassName) {
|
this.driverClassName = driverClassName;
|
}
|
|
public void setDatabase(final String database) {
|
this.database = database;
|
}
|
|
public void setType(final String type) {
|
this.type = type;
|
}
|
|
public void setUrl(final String url) {
|
this.url = url;
|
}
|
|
public boolean equals(final Object o) {
|
if (o == this) {
|
return true;
|
}
|
if (o instanceof ConfigVO) {
|
ConfigVO other = (ConfigVO) o;
|
if (other.canEqual(this)) {
|
Object this$ossUrl = getOssUrl();
|
Object other$ossUrl = other.getOssUrl();
|
if (this$ossUrl == null) {
|
if (other$ossUrl != null) {
|
return false;
|
}
|
} else if (!this$ossUrl.equals(other$ossUrl)) {
|
return false;
|
}
|
Object this$accessKey = getAccessKey();
|
Object other$accessKey = other.getAccessKey();
|
if (this$accessKey == null) {
|
if (other$accessKey != null) {
|
return false;
|
}
|
} else if (!this$accessKey.equals(other$accessKey)) {
|
return false;
|
}
|
Object this$secretKey = getSecretKey();
|
Object other$secretKey = other.getSecretKey();
|
if (this$secretKey == null) {
|
if (other$secretKey != null) {
|
return false;
|
}
|
} else if (!this$secretKey.equals(other$secretKey)) {
|
return false;
|
}
|
Object this$tdengineUrl = getTdengineUrl();
|
Object other$tdengineUrl = other.getTdengineUrl();
|
if (this$tdengineUrl == null) {
|
if (other$tdengineUrl != null) {
|
return false;
|
}
|
} else if (!this$tdengineUrl.equals(other$tdengineUrl)) {
|
return false;
|
}
|
Object this$mysqlUrl = getMysqlUrl();
|
Object other$mysqlUrl = other.getMysqlUrl();
|
if (this$mysqlUrl == null) {
|
if (other$mysqlUrl != null) {
|
return false;
|
}
|
} else if (!this$mysqlUrl.equals(other$mysqlUrl)) {
|
return false;
|
}
|
Object this$driverClassName = getDriverClassName();
|
Object other$driverClassName = other.getDriverClassName();
|
if (this$driverClassName == null) {
|
if (other$driverClassName != null) {
|
return false;
|
}
|
} else if (!this$driverClassName.equals(other$driverClassName)) {
|
return false;
|
}
|
Object this$database = getDatabase();
|
Object other$database = other.getDatabase();
|
if (this$database == null) {
|
if (other$database != null) {
|
return false;
|
}
|
} else if (!this$database.equals(other$database)) {
|
return false;
|
}
|
Object this$type = getType();
|
Object other$type = other.getType();
|
if (this$type == null) {
|
if (other$type != null) {
|
return false;
|
}
|
} else if (!this$type.equals(other$type)) {
|
return false;
|
}
|
Object this$url = getUrl();
|
Object other$url = other.getUrl();
|
return this$url == null ? other$url == null : this$url.equals(other$url);
|
}
|
return false;
|
}
|
return false;
|
}
|
|
protected boolean canEqual(final Object other) {
|
return other instanceof ConfigVO;
|
}
|
|
public int hashCode() {
|
Object $ossUrl = getOssUrl();
|
int result = (1 * 59) + ($ossUrl == null ? 43 : $ossUrl.hashCode());
|
Object $accessKey = getAccessKey();
|
int result2 = (result * 59) + ($accessKey == null ? 43 : $accessKey.hashCode());
|
Object $secretKey = getSecretKey();
|
int result3 = (result2 * 59) + ($secretKey == null ? 43 : $secretKey.hashCode());
|
Object $tdengineUrl = getTdengineUrl();
|
int result4 = (result3 * 59) + ($tdengineUrl == null ? 43 : $tdengineUrl.hashCode());
|
Object $mysqlUrl = getMysqlUrl();
|
int result5 = (result4 * 59) + ($mysqlUrl == null ? 43 : $mysqlUrl.hashCode());
|
Object $driverClassName = getDriverClassName();
|
int result6 = (result5 * 59) + ($driverClassName == null ? 43 : $driverClassName.hashCode());
|
Object $database = getDatabase();
|
int result7 = (result6 * 59) + ($database == null ? 43 : $database.hashCode());
|
Object $type = getType();
|
int result8 = (result7 * 59) + ($type == null ? 43 : $type.hashCode());
|
Object $url = getUrl();
|
return (result8 * 59) + ($url == null ? 43 : $url.hashCode());
|
}
|
|
public String toString() {
|
return "ConfigVO(ossUrl=" + getOssUrl() + ", accessKey=" + getAccessKey() + ", secretKey=" + getSecretKey() + ", tdengineUrl=" + getTdengineUrl() + ", mysqlUrl=" + getMysqlUrl() + ", driverClassName=" + getDriverClassName() + ", database=" + getDatabase() + ", type=" + getType() + ", url=" + getUrl() + ")";
|
}
|
|
public static ConfigVOBuilder builder() {
|
return new ConfigVOBuilder();
|
}
|
|
public ConfigVO() {
|
}
|
|
public ConfigVO(final String ossUrl, final String accessKey, final String secretKey, final String tdengineUrl, final String mysqlUrl, final String driverClassName, final String database, final String type, final String url) {
|
this.ossUrl = ossUrl;
|
this.accessKey = accessKey;
|
this.secretKey = secretKey;
|
this.tdengineUrl = tdengineUrl;
|
this.mysqlUrl = mysqlUrl;
|
this.driverClassName = driverClassName;
|
this.database = database;
|
this.type = type;
|
this.url = url;
|
}
|
|
public String getOssUrl() {
|
return this.ossUrl;
|
}
|
|
public String getAccessKey() {
|
return this.accessKey;
|
}
|
|
public String getSecretKey() {
|
return this.secretKey;
|
}
|
|
public String getTdengineUrl() {
|
return this.tdengineUrl;
|
}
|
|
public String getMysqlUrl() {
|
return this.mysqlUrl;
|
}
|
|
public String getDriverClassName() {
|
return this.driverClassName;
|
}
|
|
public String getDatabase() {
|
return this.database;
|
}
|
|
public String getType() {
|
return this.type;
|
}
|
|
public String getUrl() {
|
return this.url;
|
}
|
}
|