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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter code;

    private DoubleFilter productLevel1;

    private DoubleFilter productLevel2;

    private DoubleFilter productLevel3;

    private InstantFilter createDate;

    private LongFilter tbProductBlockDetailsId;

    private LongFilter tbCropId;

    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 getProductLevel1() {
        return productLevel1;
    }

    public void setProductLevel1(DoubleFilter productLevel1) {
        this.productLevel1 = productLevel1;
    }

    public DoubleFilter getProductLevel2() {
        return productLevel2;
    }

    public void setProductLevel2(DoubleFilter productLevel2) {
        this.productLevel2 = productLevel2;
    }

    public DoubleFilter getProductLevel3() {
        return productLevel3;
    }

    public void setProductLevel3(DoubleFilter productLevel3) {
        this.productLevel3 = productLevel3;
    }

    public InstantFilter getCreateDate() {
        return createDate;
    }

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

    public LongFilter getTbProductBlockDetailsId() {
        return tbProductBlockDetailsId;
    }

    public void setTbProductBlockDetailsId(LongFilter tbProductBlockDetailsId) {
        this.tbProductBlockDetailsId = tbProductBlockDetailsId;
    }

    public LongFilter getTbCropId() {
        return tbCropId;
    }

    public void setTbCropId(LongFilter tbCropId) {
        this.tbCropId = tbCropId;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBProductBlockDetailsReportCriteria that = (TBProductBlockDetailsReportCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(code, that.code) &&
            Objects.equals(productLevel1, that.productLevel1) &&
            Objects.equals(productLevel2, that.productLevel2) &&
            Objects.equals(productLevel3, that.productLevel3) &&
            Objects.equals(createDate, that.createDate) &&
            Objects.equals(tbProductBlockDetailsId, that.tbProductBlockDetailsId) &&
            Objects.equals(tbCropId, that.tbCropId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        code,
        productLevel1,
        productLevel2,
        productLevel3,
        createDate,
        tbProductBlockDetailsId,
        tbCropId
        );
    }

    @Override
    public String toString() {
        return "TBProductBlockDetailsReportCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (code != null ? "code=" + code + ", " : "") +
                (productLevel1 != null ? "productLevel1=" + productLevel1 + ", " : "") +
                (productLevel2 != null ? "productLevel2=" + productLevel2 + ", " : "") +
                (productLevel3 != null ? "productLevel3=" + productLevel3 + ", " : "") +
                (createDate != null ? "createDate=" + createDate + ", " : "") +
                (tbProductBlockDetailsId != null ? "tbProductBlockDetailsId=" + tbProductBlockDetailsId + ", " : "") +
                (tbCropId != null ? "tbCropId=" + tbCropId + ", " : "") +
            "}";
    }

}
