package com.lanyuanxiaoyao.service.configuration.entity.info;

/**
 * Table Info 表查询条件缓存
 *
 * @author lanyuanxiaoyao
 * @date 2023-07-14
 */
public class TableInfoSearchCache {
    private Long flinkJobId;
    private String alias;
    private String hdfs;
    private String pulsar;
    private String topic;

    public TableInfoSearchCache() {
    }

    public TableInfoSearchCache(Long flinkJobId, String alias, String hdfs, String pulsar, String topic) {
        this.flinkJobId = flinkJobId;
        this.alias = alias;
        this.hdfs = hdfs;
        this.pulsar = pulsar;
        this.topic = topic;
    }

    public Long getFlinkJobId() {
        return flinkJobId;
    }

    public void setFlinkJobId(Long flinkJobId) {
        this.flinkJobId = flinkJobId;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getHdfs() {
        return hdfs;
    }

    public void setHdfs(String hdfs) {
        this.hdfs = hdfs;
    }

    public String getPulsar() {
        return pulsar;
    }

    public void setPulsar(String pulsar) {
        this.pulsar = pulsar;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

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

        TableInfoSearchCache that = (TableInfoSearchCache) o;

        if (!flinkJobId.equals(that.flinkJobId)) return false;
        if (!alias.equals(that.alias)) return false;
        if (!hdfs.equals(that.hdfs)) return false;
        if (!pulsar.equals(that.pulsar)) return false;
        return topic.equals(that.topic);
    }

    @Override
    public int hashCode() {
        int result = flinkJobId.hashCode();
        result = 31 * result + alias.hashCode();
        result = 31 * result + hdfs.hashCode();
        result = 31 * result + pulsar.hashCode();
        result = 31 * result + topic.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "TableInfoSearchCache{" +
               "flinkJobId=" + flinkJobId +
               ", alias='" + alias + '\'' +
               ", hdfs='" + hdfs + '\'' +
               ", pulsar='" + pulsar + '\'' +
               ", topic='" + topic + '\'' +
               '}';
    }
}
