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 TBLimits entity. This class is used in TBLimitsResource to
 * receive all the possible filtering options from the Http GET request parameters.
 * For example the following could be a valid requests:
 * <code> /tb-limits?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 TBLimitsCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private DoubleFilter upperLimit;

    private DoubleFilter lowerLimit;

    private LongFilter tbGuidelineDetailsId;

    private LongFilter tbObjectParameterId;

    private LongFilter tbEnvironmentalParameterId;

    public LongFilter getId() {
        return id;
    }

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

    public DoubleFilter getUpperLimit() {
        return upperLimit;
    }

    public void setUpperLimit(DoubleFilter upperLimit) {
        this.upperLimit = upperLimit;
    }

    public DoubleFilter getLowerLimit() {
        return lowerLimit;
    }

    public void setLowerLimit(DoubleFilter lowerLimit) {
        this.lowerLimit = lowerLimit;
    }

    public LongFilter getTbGuidelineDetailsId() {
        return tbGuidelineDetailsId;
    }

    public void setTbGuidelineDetailsId(LongFilter tbGuidelineDetailsId) {
        this.tbGuidelineDetailsId = tbGuidelineDetailsId;
    }

    public LongFilter getTbObjectParameterId() {
        return tbObjectParameterId;
    }

    public void setTbObjectParameterId(LongFilter tbObjectParameterId) {
        this.tbObjectParameterId = tbObjectParameterId;
    }

    public LongFilter getTbEnvironmentalParameterId() {
        return tbEnvironmentalParameterId;
    }

    public void setTbEnvironmentalParameterId(LongFilter tbEnvironmentalParameterId) {
        this.tbEnvironmentalParameterId = tbEnvironmentalParameterId;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBLimitsCriteria that = (TBLimitsCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(upperLimit, that.upperLimit) &&
            Objects.equals(lowerLimit, that.lowerLimit) &&
            Objects.equals(tbGuidelineDetailsId, that.tbGuidelineDetailsId) &&
            Objects.equals(tbObjectParameterId, that.tbObjectParameterId) &&
            Objects.equals(tbEnvironmentalParameterId, that.tbEnvironmentalParameterId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        upperLimit,
        lowerLimit,
        tbGuidelineDetailsId,
        tbObjectParameterId,
        tbEnvironmentalParameterId
        );
    }

    @Override
    public String toString() {
        return "TBLimitsCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (upperLimit != null ? "upperLimit=" + upperLimit + ", " : "") +
                (lowerLimit != null ? "lowerLimit=" + lowerLimit + ", " : "") +
                (tbGuidelineDetailsId != null ? "tbGuidelineDetailsId=" + tbGuidelineDetailsId + ", " : "") +
                (tbObjectParameterId != null ? "tbObjectParameterId=" + tbObjectParameterId + ", " : "") +
                (tbEnvironmentalParameterId != null ? "tbEnvironmentalParameterId=" + tbEnvironmentalParameterId + ", " : "") +
            "}";
    }

}
