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 TBSuppliesOrderDetails entity. This class is used in TBSuppliesOrderDetailsResource 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-order-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 TBSuppliesOrderDetailsCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private DoubleFilter quantity;

    private LongFilter price;

    private LongFilter tbSuppliesId;

    private LongFilter tbSuppliesOrderId;

    public LongFilter getId() {
        return id;
    }

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

    public DoubleFilter getQuantity() {
        return quantity;
    }

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

    public LongFilter getPrice() {
        return price;
    }

    public void setPrice(LongFilter price) {
        this.price = price;
    }

    public LongFilter getTbSuppliesId() {
        return tbSuppliesId;
    }

    public void setTbSuppliesId(LongFilter tbSuppliesId) {
        this.tbSuppliesId = tbSuppliesId;
    }

    public LongFilter getTbSuppliesOrderId() {
        return tbSuppliesOrderId;
    }

    public void setTbSuppliesOrderId(LongFilter tbSuppliesOrderId) {
        this.tbSuppliesOrderId = tbSuppliesOrderId;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBSuppliesOrderDetailsCriteria that = (TBSuppliesOrderDetailsCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(quantity, that.quantity) &&
            Objects.equals(price, that.price) &&
            Objects.equals(tbSuppliesId, that.tbSuppliesId) &&
            Objects.equals(tbSuppliesOrderId, that.tbSuppliesOrderId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        quantity,
        price,
        tbSuppliesId,
        tbSuppliesOrderId
        );
    }

    @Override
    public String toString() {
        return "TBSuppliesOrderDetailsCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (quantity != null ? "quantity=" + quantity + ", " : "") +
                (price != null ? "price=" + price + ", " : "") +
                (tbSuppliesId != null ? "tbSuppliesId=" + tbSuppliesId + ", " : "") +
                (tbSuppliesOrderId != null ? "tbSuppliesOrderId=" + tbSuppliesOrderId + ", " : "") +
            "}";
    }

}
