package org.texttechnologylab.project.gruppe_05_1.domain.mdb;

import java.time.LocalDate;
import java.util.Objects;
import java.util.StringJoiner;

public abstract class Institution {

    private String insartLang;
    private String insLang;
    private LocalDate mdbinsVon;
    private LocalDate mdbinsBis;
    private String fktLang;
    private LocalDate fktinsVon;
    private LocalDate fktinsBis;

    public String getInsartLang() {
        return insartLang;
    }

    public void setInsartLang(String insartLang) {
        this.insartLang = insartLang;
    }

    public String getInsLang() {
        return insLang;
    }

    public void setInsLang(String insLang) {
        this.insLang = insLang;
    }

    public LocalDate getMdbinsVon() {
        return mdbinsVon;
    }

    public void setMdbinsVon(LocalDate mdbinsVon) {
        this.mdbinsVon = mdbinsVon;
    }

    public LocalDate getMdbinsBis() {
        return mdbinsBis;
    }

    public void setMdbinsBis(LocalDate mdbinsBis) {
        this.mdbinsBis = mdbinsBis;
    }

    public String getFktLang() {
        return fktLang;
    }

    public void setFktLang(String fktLang) {
        this.fktLang = fktLang;
    }

    public LocalDate getFktinsVon() {
        return fktinsVon;
    }

    public void setFktinsVon(LocalDate fktinsVon) {
        this.fktinsVon = fktinsVon;
    }

    public LocalDate getFktinsBis() {
        return fktinsBis;
    }

    public void setFktinsBis(LocalDate fktinsBis) {
        this.fktinsBis = fktinsBis;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Institution)) return false;
        Institution that = (Institution) o;
        return Objects.equals(insartLang, that.insartLang) && Objects.equals(insLang, that.insLang) && Objects.equals(mdbinsVon, that.mdbinsVon) && Objects.equals(mdbinsBis, that.mdbinsBis) && Objects.equals(fktLang, that.fktLang) && Objects.equals(fktinsVon, that.fktinsVon) && Objects.equals(fktinsBis, that.fktinsBis);
    }

    @Override
    public int hashCode() {
        return Objects.hash(insartLang, insLang, mdbinsVon, mdbinsBis, fktLang, fktinsVon, fktinsBis);
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Institution.class.getSimpleName() + "[", "]")
                .add("insartLang='" + insartLang + "'")
                .add("insLang='" + insLang + "'")
                .add("mdbinsVon=" + mdbinsVon)
                .add("mdbinsBis=" + mdbinsBis)
                .add("fktLang='" + fktLang + "'")
                .add("fktinsVon=" + fktinsVon)
                .add("fktinsBis=" + fktinsBis)
                .toString();
    }
}
