package vn.azteam.tpf.service.dto;

import java.io.Serializable;
import java.util.Objects;
import io.github.jhipster.service.filter.BooleanFilter;
import io.github.jhipster.service.filter.DoubleFilter;
import io.github.jhipster.service.filter.Filter;
import io.github.jhipster.service.filter.FloatFilter;
import io.github.jhipster.service.filter.IntegerFilter;
import io.github.jhipster.service.filter.LongFilter;
import io.github.jhipster.service.filter.StringFilter;

/**
 * Criteria class for the TBGuidelineDetails entity. This class is used in TBGuidelineDetailsResource to
 * receive all the possible filtering options from the Http GET request parameters.
 * For example the following could be a valid requests:
 * <code> /tb-guideline-details?id.greaterThan=5&amp;attr1.contains=something&amp;attr2.specified=false</code>
 * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use
 * fix type specific filters.
 */
public class TBGuidelineDetailsCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private IntegerFilter ageDayStart;

    private IntegerFilter ageDayEnd;

    private LongFilter tbGuidelineId;

    private LongFilter tbGuidelinePeriodId;

    public LongFilter getId() {
        return id;
    }

    public void setId(LongFilter id) {
        this.id = id;
    }

    public IntegerFilter getAgeDayStart() {
        return ageDayStart;
    }

    public void setAgeDayStart(IntegerFilter ageDayStart) {
        this.ageDayStart = ageDayStart;
    }

    public IntegerFilter getAgeDayEnd() {
        return ageDayEnd;
    }

    public void setAgeDayEnd(IntegerFilter ageDayEnd) {
        this.ageDayEnd = ageDayEnd;
    }

    public LongFilter getTbGuidelineId() {
        return tbGuidelineId;
    }

    public void setTbGuidelineId(LongFilter tbGuidelineId) {
        this.tbGuidelineId = tbGuidelineId;
    }

    public LongFilter getTbGuidelinePeriodId() {
        return tbGuidelinePeriodId;
    }

    public void setTbGuidelinePeriodId(LongFilter tbGuidelinePeriodId) {
        this.tbGuidelinePeriodId = tbGuidelinePeriodId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBGuidelineDetailsCriteria that = (TBGuidelineDetailsCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(ageDayStart, that.ageDayStart) &&
            Objects.equals(ageDayEnd, that.ageDayEnd) &&
            Objects.equals(tbGuidelineId, that.tbGuidelineId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        ageDayStart,
        ageDayEnd,
        tbGuidelineId
        );
    }

    @Override
    public String toString() {
        return "TBGuidelineDetailsCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (ageDayStart != null ? "ageDayStart=" + ageDayStart + ", " : "") +
                (ageDayEnd != null ? "ageDayEnd=" + ageDayEnd + ", " : "") +
                (tbGuidelineId != null ? "tbGuidelineId=" + tbGuidelineId + ", " : "") +
            "}";
    }

}
