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;
import io.github.jhipster.service.filter.InstantFilter;

/**
 * Criteria class for the TBBlockDetailsReport entity. This class is used in TBBlockDetailsReportResource 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-reports?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 TBBlockDetailsReportCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter code;

    private DoubleFilter quantity;

    private InstantFilter createDate;

    private LongFilter tbBlockDetailsId;

    private LongFilter tbSuppliesTypeId;

    private LongFilter tbSuppliesInWarehouseId;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getCode() {
        return code;
    }

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

    public DoubleFilter getQuantity() {
        return quantity;
    }

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

    public InstantFilter getCreateDate() {
        return createDate;
    }

    public void setCreateDate(InstantFilter createDate) {
        this.createDate = createDate;
    }

    public LongFilter getTbBlockDetailsId() {
        return tbBlockDetailsId;
    }

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

    public LongFilter getTbSuppliesTypeId() {
        return tbSuppliesTypeId;
    }

    public void setTbSuppliesTypeId(LongFilter tbSuppliesTypeId) {
        this.tbSuppliesTypeId = tbSuppliesTypeId;
    }

    public LongFilter getTbSuppliesInWarehouseId() {
        return tbSuppliesInWarehouseId;
    }

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


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

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        code,
        quantity,
        createDate,
        tbBlockDetailsId,
        tbSuppliesTypeId,
        tbSuppliesInWarehouseId
        );
    }

    @Override
    public String toString() {
        return "TBBlockDetailsReportCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (code != null ? "code=" + code + ", " : "") +
                (quantity != null ? "quantity=" + quantity + ", " : "") +
                (createDate != null ? "createDate=" + createDate + ", " : "") +
                (tbBlockDetailsId != null ? "tbBlockDetailsId=" + tbBlockDetailsId + ", " : "") +
                (tbSuppliesTypeId != null ? "tbSuppliesTypeId=" + tbSuppliesTypeId + ", " : "") +
                (tbSuppliesInWarehouseId != null ? "tbSuppliesInWarehouseId=" + tbSuppliesInWarehouseId + ", " : "") +
            "}";
    }

}
