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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private DoubleFilter index;

    private IntegerFilter times;

    private LongFilter tbEnvironmentalParameterId;

    private LongFilter tbActivityId;

    private LongFilter tbEquipmentOfCustomerId;

    public LongFilter getId() {
        return id;
    }

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

    public DoubleFilter getIndex() {
        return index;
    }

    public void setIndex(DoubleFilter index) {
        this.index = index;
    }

    public IntegerFilter getTimes() {
        return times;
    }

    public void setTimes(IntegerFilter times) {
        this.times = times;
    }

    public LongFilter getTbEnvironmentalParameterId() {
        return tbEnvironmentalParameterId;
    }

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

    public LongFilter getTbActivityId() {
        return tbActivityId;
    }

    public void setTbActivityId(LongFilter tbActivityId) {
        this.tbActivityId = tbActivityId;
    }

    public LongFilter getTbEquipmentOfCustomerId() {
        return tbEquipmentOfCustomerId;
    }

    public void setTbEquipmentOfCustomerId(LongFilter tbEquipmentOfCustomerId) {
        this.tbEquipmentOfCustomerId = tbEquipmentOfCustomerId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBEnvironmentUpdateCriteria that = (TBEnvironmentUpdateCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(index, that.index) &&
            Objects.equals(times, that.times) &&
            Objects.equals(tbEnvironmentalParameterId, that.tbEnvironmentalParameterId) &&
            Objects.equals(tbActivityId, that.tbActivityId) &&
            Objects.equals(tbEquipmentOfCustomerId, that.tbEquipmentOfCustomerId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        index,
        times,
        tbEnvironmentalParameterId,
        tbActivityId,
        tbEquipmentOfCustomerId
        );
    }

    @Override
    public String toString() {
        return "TBEnvironmentUpdateCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (index != null ? "index=" + index + ", " : "") +
                (times != null ? "times=" + times + ", " : "") +
                (tbEnvironmentalParameterId != null ? "tbEnvironmentalId=" + tbEnvironmentalParameterId + ", " : "") +
                (tbActivityId != null ? "tbActivityId=" + tbActivityId + ", " : "") +
                (tbEquipmentOfCustomerId != null ? "tbEnvironmentOfCustomerId=" + tbEquipmentOfCustomerId + ", " : "") +
            "}";
    }

}
