com.github.javaclub.cdl.client.matrix.router.SQLExecutionUnit Maven / Gradle / Ivy
package com.github.javaclub.cdl.client.matrix.router;
public class SQLExecutionUnit {
private final String groupName;
private final String sql;
public SQLExecutionUnit(final String groupName, final String sql) {
this.groupName = groupName;
this.sql = sql;
}
public String getGroupName() {
return groupName;
}
public String getSql() {
return sql;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((groupName == null) ? 0 : groupName.hashCode());
result = prime * result + ((sql == null) ? 0 : sql.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
SQLExecutionUnit other = (SQLExecutionUnit) obj;
if (groupName == null) {
if (other.groupName != null)
return false;
} else if (!groupName.equals(other.groupName))
return false;
if (sql == null) {
if (other.sql != null)
return false;
} else if (!sql.equals(other.sql))
return false;
return true;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy