com.spotify.dbeam.args.AutoValue_JdbcConnectionArgs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dbeam-core Show documentation
Show all versions of dbeam-core Show documentation
Top level DBeam core implementation
package com.spotify.dbeam.args;
import javax.annotation.Generated;
import javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_JdbcConnectionArgs extends JdbcConnectionArgs {
private final String driverClassName;
private final String url;
private final String username;
private final String password;
private AutoValue_JdbcConnectionArgs(
String driverClassName,
String url,
@Nullable String username,
@Nullable String password) {
this.driverClassName = driverClassName;
this.url = url;
this.username = username;
this.password = password;
}
@Override
public String driverClassName() {
return driverClassName;
}
@Override
public String url() {
return url;
}
@Nullable
@Override
String username() {
return username;
}
@Nullable
@Override
String password() {
return password;
}
@Override
public String toString() {
return "JdbcConnectionArgs{"
+ "driverClassName=" + driverClassName + ", "
+ "url=" + url + ", "
+ "username=" + username + ", "
+ "password=" + password
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof JdbcConnectionArgs) {
JdbcConnectionArgs that = (JdbcConnectionArgs) o;
return this.driverClassName.equals(that.driverClassName())
&& this.url.equals(that.url())
&& (this.username == null ? that.username() == null : this.username.equals(that.username()))
&& (this.password == null ? that.password() == null : this.password.equals(that.password()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= driverClassName.hashCode();
h$ *= 1000003;
h$ ^= url.hashCode();
h$ *= 1000003;
h$ ^= (username == null) ? 0 : username.hashCode();
h$ *= 1000003;
h$ ^= (password == null) ? 0 : password.hashCode();
return h$;
}
private static final long serialVersionUID = 280458166508L;
@Override
JdbcConnectionArgs.Builder builder() {
return new Builder(this);
}
static final class Builder extends JdbcConnectionArgs.Builder {
private String driverClassName;
private String url;
private String username;
private String password;
Builder() {
}
private Builder(JdbcConnectionArgs source) {
this.driverClassName = source.driverClassName();
this.url = source.url();
this.username = source.username();
this.password = source.password();
}
@Override
JdbcConnectionArgs.Builder setDriverClassName(String driverClassName) {
if (driverClassName == null) {
throw new NullPointerException("Null driverClassName");
}
this.driverClassName = driverClassName;
return this;
}
@Override
JdbcConnectionArgs.Builder setUrl(String url) {
if (url == null) {
throw new NullPointerException("Null url");
}
this.url = url;
return this;
}
@Override
JdbcConnectionArgs.Builder setUsername(String username) {
this.username = username;
return this;
}
@Override
JdbcConnectionArgs.Builder setPassword(String password) {
this.password = password;
return this;
}
@Override
JdbcConnectionArgs build() {
if (this.driverClassName == null
|| this.url == null) {
StringBuilder missing = new StringBuilder();
if (this.driverClassName == null) {
missing.append(" driverClassName");
}
if (this.url == null) {
missing.append(" url");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_JdbcConnectionArgs(
this.driverClassName,
this.url,
this.username,
this.password);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy