All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.neoremind.fountain.DataSourceEntity Maven / Gradle / Ivy

package net.neoremind.fountain;

/**
 * 数据源实体
 *
 * @author zhangxu
 */
public class DataSourceEntity {

    /**
     * IP或者host
     */
    private String ip;

    /**
     * 端口
     */
    private Integer port;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * slavdId
     */
    private int slaveId;

    @Override
    public String toString() {
        return "DataSourceEntity{" +
                "ip='" + ip + '\'' +
                ", port=" + port +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", slaveId=" + slaveId +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        DataSourceEntity that = (DataSourceEntity) o;

        if (ip != null ? !ip.equals(that.ip) : that.ip != null) {
            return false;
        }
        return !(port != null ? !port.equals(that.port) : that.port != null);

    }

    @Override
    public int hashCode() {
        int result = ip != null ? ip.hashCode() : 0;
        result = 31 * result + (port != null ? port.hashCode() : 0);
        return result;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getSlaveId() {
        return slaveId;
    }

    public void setSlaveId(int slaveId) {
        this.slaveId = slaveId;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy