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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter dosage;

    private DoubleFilter quantity;

    private DoubleFilter cost;

    private StringFilter howToUse;

    private LongFilter tbBlockDetailsId;

    private LongFilter tbEquipmentOfCustomerId;

    private LongFilter tbSuppliesInWarehouseId;

    private LongFilter tbActivityId;

    private LongFilter tbGuidelineActivityId;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getDosage() {
        return dosage;
    }

    public void setDosage(StringFilter dosage) {
        this.dosage = dosage;
    }

    public DoubleFilter getQuantity() {
        return quantity;
    }

    public void setQuantity(DoubleFilter quantity) {
        this.quantity = quantity;
    }

    public DoubleFilter getCost() {
        return cost;
    }

    public void setCost(DoubleFilter cost) {
        this.cost = cost;
    }

    public StringFilter getHowToUse() {
        return howToUse;
    }

    public void setHowToUse(StringFilter howToUse) {
        this.howToUse = howToUse;
    }

    public LongFilter getTbBlockDetailsId() {
        return tbBlockDetailsId;
    }

    public void setTbBlockDetailsId(LongFilter tbBlockDetailsId) {
        this.tbBlockDetailsId = tbBlockDetailsId;
    }

    public LongFilter getTbEquipmentOfCustomerId() {
        return tbEquipmentOfCustomerId;
    }

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

    public LongFilter getTbSuppliesInWarehouseId() {
        return tbSuppliesInWarehouseId;
    }

    public void setTbSuppliesInWarehouseId(LongFilter tbSuppliesInWarehouseId) {
        this.tbSuppliesInWarehouseId = tbSuppliesInWarehouseId;
    }

    public LongFilter getTbActivityId() {
        return tbActivityId;
    }

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

    public LongFilter getTbGuidelineActivityId() {
        return tbGuidelineActivityId;
    }

    public void setTbGuidelineActivityId(LongFilter tbGuidelineActivityId) {
        this.tbGuidelineActivityId = tbGuidelineActivityId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBSuppliesUsingDetailsCriteria that = (TBSuppliesUsingDetailsCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(dosage, that.dosage) &&
            Objects.equals(quantity, that.quantity) &&
            Objects.equals(cost, that.cost) &&
            Objects.equals(howToUse, that.howToUse) &&
            Objects.equals(tbBlockDetailsId, that.tbBlockDetailsId) &&
            Objects.equals(tbEquipmentOfCustomerId, that.tbEquipmentOfCustomerId) &&
            Objects.equals(tbSuppliesInWarehouseId, that.tbSuppliesInWarehouseId) &&
            Objects.equals(tbActivityId, that.tbActivityId) &&
            Objects.equals(tbGuidelineActivityId, that.tbGuidelineActivityId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        dosage,
        quantity,
        cost,
        howToUse,
        tbBlockDetailsId,
        tbEquipmentOfCustomerId,
        tbSuppliesInWarehouseId,
        tbActivityId,
        tbGuidelineActivityId
        );
    }

    @Override
    public String toString() {
        return "TBSuppliesUsingDetailsCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (dosage != null ? "dosage=" + dosage + ", " : "") +
                (quantity != null ? "quantity=" + quantity + ", " : "") +
                (cost != null ? "cost=" + cost + ", " : "") +
                (howToUse != null ? "howToUse=" + howToUse + ", " : "") +
                (tbBlockDetailsId != null ? "tbBlockDetailsId=" + tbBlockDetailsId + ", " : "") +
                (tbEquipmentOfCustomerId != null ? "tbEquipmentOfCustomerId=" + tbEquipmentOfCustomerId + ", " : "") +
                (tbSuppliesInWarehouseId != null ? "tbSuppliesInWarehouseId=" + tbSuppliesInWarehouseId + ", " : "") +
                (tbActivityId != null ? "tbActivityId=" + tbActivityId + ", " : "") +
                (tbGuidelineActivityId != null ? "tbGuidelineActivityId=" + tbGuidelineActivityId + ", " : "") +
            "}";
    }

}
