org.zodiac.datasource.config.SpringDynamicDataSourceConfig Maven / Gradle / Ivy
The newest version!
package org.zodiac.datasource.config;
public class SpringDynamicDataSourceConfig extends DynamicDataSourceConfig {
private static final long serialVersionUID = -1178846249158847891L;
private String beanName;
public String getBeanName() {
return beanName;
}
public void setBeanName(String beanName) {
this.beanName = beanName;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((beanName == null) ? 0 : beanName.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
SpringDynamicDataSourceConfig other = (SpringDynamicDataSourceConfig)obj;
if (beanName == null) {
if (other.beanName != null)
return false;
} else if (!beanName.equals(other.beanName))
return false;
return true;
}
}