package vn.azteam.tpf.service.dto;

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

/**
 * Criteria class for the TBBlockDetails entity. This class is used in TBBlockDetailsResource to
 * receive all the possible filtering options from the Http GET request parameters.
 * For example the following could be a valid requests:
 * <code> /tb-block-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 TBBlockDetailsCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private DoubleFilter quantity;

    private StringFilter code;

    private InstantFilter mfgDate;

    private InstantFilter expDate;

    private LongFilter tbSuppliesInWarehouseId;

    private LongFilter tbSuppliesId;

    private LongFilter tbEntityId;

    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 StringFilter getCode() {
        return code;
    }

    public void setCode(StringFilter code) {
        this.code = code;
    }

    public InstantFilter getMfgDate() {
        return mfgDate;
    }

    public void setMfgDate(InstantFilter mfgDate) {
        this.mfgDate = mfgDate;
    }

    public InstantFilter getExpDate() {
        return expDate;
    }

    public void setExpDate(InstantFilter expDate) {
        this.expDate = expDate;
    }

    public LongFilter getTbSuppliesInWarehouseId() {
        return tbSuppliesInWarehouseId;
    }

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

    public LongFilter getTbSuppliesId() {
        return tbSuppliesId;
    }

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

    public LongFilter getTbEntityId() {
        return tbEntityId;
    }

    public void setTbEntityId(LongFilter tbEntityId) {
        this.tbEntityId = tbEntityId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBBlockDetailsCriteria that = (TBBlockDetailsCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(quantity, that.quantity) &&
            Objects.equals(code, that.code) &&
            Objects.equals(mfgDate, that.mfgDate) &&
            Objects.equals(expDate, that.expDate) &&
            Objects.equals(tbSuppliesInWarehouseId, that.tbSuppliesInWarehouseId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        quantity,
        code,
        mfgDate,
        expDate,
        tbSuppliesInWarehouseId
        );
    }

    @Override
    public String toString() {
        return "TBBlockDetailsCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (quantity != null ? "quantity=" + quantity + ", " : "") +
                (code != null ? "code=" + code + ", " : "") +
                (mfgDate != null ? "mfgDate=" + mfgDate + ", " : "") +
                (expDate != null ? "expDate=" + expDate + ", " : "") +
                (tbSuppliesInWarehouseId != null ? "tbSuppliesInWarehouse=" + tbSuppliesInWarehouseId + ", " : "") +
            "}";
    }

}
