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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter qrCode;

    private StringFilter code;

    private DoubleFilter areaM2;

    private LongFilter tbCropType;

    private InstantFilter startDate;

    private InstantFilter endDate;

    private StringFilter status;

    private StringFilter description;

    private IntegerFilter ageDayStartAt;

    private InstantFilter createdDate;

    private InstantFilter modifiedDate;

    private InstantFilter deletedDate;

    private LongFilter tbSuppliesId;

    private StringFilter tbSuppliesSku;

    private LongFilter tbGuidelineId;

    private LongFilter netHouseId;

    private StringFilter netHouseName;

    private LongFilter areaId;

    private StringFilter area;

    private LongFilter createdById;

    private LongFilter modifiedById;

    private LongFilter deletedById;

    private LongFilter tbDetailUserId;

    private StringFilter tbDetailUserFullName;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getQrCode() {
        return qrCode;
    }

    public void setQrCode(StringFilter qrCode) {
        this.qrCode = qrCode;
    }

    public StringFilter getCode() {
        return code;
    }

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

    public DoubleFilter getAreaM2() {
        return areaM2;
    }

    public void setAreaM2(DoubleFilter areaM2) {
        this.areaM2 = areaM2;
    }

    public LongFilter getTbCropType() {
        return tbCropType;
    }

    public void setTbCropType(LongFilter tbCropType) {
        this.tbCropType = tbCropType;
    }

    public InstantFilter getStartDate() {
        return startDate;
    }

    public void setStartDate(InstantFilter startDate) {
        this.startDate = startDate;
    }

    public InstantFilter getEndDate() {
        return endDate;
    }

    public void setEndDate(InstantFilter endDate) {
        this.endDate = endDate;
    }

    public StringFilter getStatus() {
        return status;
    }

    public void setStatus(StringFilter status) {
        this.status = status;
    }

    public StringFilter getDescription() {
        return description;
    }

    public void setDescription(StringFilter description) {
        this.description = description;
    }

    public IntegerFilter getAgeDayStartAt() {
        return ageDayStartAt;
    }

    public void setAgeDayStartAt(IntegerFilter ageDayStartAt) {
        this.ageDayStartAt = ageDayStartAt;
    }

    public InstantFilter getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(InstantFilter createdDate) {
        this.createdDate = createdDate;
    }

    public InstantFilter getModifiedDate() {
        return modifiedDate;
    }

    public void setModifiedDate(InstantFilter modifiedDate) {
        this.modifiedDate = modifiedDate;
    }

    public InstantFilter getDeletedDate() {
        return deletedDate;
    }

    public void setDeletedDate(InstantFilter deletedDate) {
        this.deletedDate = deletedDate;
    }

    public LongFilter getTbSuppliesId() {
        return tbSuppliesId;
    }

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

    public LongFilter getTbGuidelineId() {
        return tbGuidelineId;
    }

    public void setTbGuidelineId(LongFilter tbGuidelineId) {
        this.tbGuidelineId = tbGuidelineId;
    }

    public LongFilter getNetHouseId() {
        return netHouseId;
    }

    public void setNetHouseId(LongFilter netHouseId) {
        this.netHouseId = netHouseId;
    }

    public LongFilter getCreatedById() {
        return createdById;
    }

    public void setCreatedById(LongFilter createdById) {
        this.createdById = createdById;
    }

    public LongFilter getModifiedById() {
        return modifiedById;
    }

    public void setModifiedById(LongFilter modifiedById) {
        this.modifiedById = modifiedById;
    }

    public LongFilter getDeletedById() {
        return deletedById;
    }

    public void setDeletedById(LongFilter deletedById) {
        this.deletedById = deletedById;
    }

    public LongFilter getTbDetailUserId() {
        return tbDetailUserId;
    }

    public void setTbDetailUserId(LongFilter tbDetailUserId) {
        this.tbDetailUserId = tbDetailUserId;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBCropCriteria that = (TBCropCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(qrCode, that.qrCode) &&
            Objects.equals(code, that.code) &&
            Objects.equals(areaM2, that.areaM2) &&
            Objects.equals(tbCropType, that.tbCropType) &&
            Objects.equals(startDate, that.startDate) &&
            Objects.equals(endDate, that.endDate) &&
            Objects.equals(status, that.status) &&
            Objects.equals(description, that.description) &&
            Objects.equals(ageDayStartAt, that.ageDayStartAt) &&
            Objects.equals(createdDate, that.createdDate) &&
            Objects.equals(modifiedDate, that.modifiedDate) &&
            Objects.equals(deletedDate, that.deletedDate) &&
            Objects.equals(tbSuppliesId, that.tbSuppliesId) &&
            Objects.equals(tbGuidelineId, that.tbGuidelineId) &&
            Objects.equals(netHouseId, that.netHouseId) &&
            Objects.equals(createdById, that.createdById) &&
            Objects.equals(modifiedById, that.modifiedById) &&
            Objects.equals(deletedById, that.deletedById) &&
            Objects.equals(tbDetailUserId, that.tbDetailUserId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        qrCode,
        code,
        areaM2,
        tbCropType,
        startDate,
        endDate,
        status,
        description,
        ageDayStartAt,
        createdDate,
        modifiedDate,
        deletedDate,
        tbSuppliesId,
        tbGuidelineId,
        netHouseId,
        createdById,
        modifiedById,
        deletedById,
        tbDetailUserId
        );
    }

    @Override
    public String toString() {
        return "TBCropCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (qrCode != null ? "qrCode=" + qrCode + ", " : "") +
                (code != null ? "code=" + code + ", " : "") +
                (areaM2 != null ? "areaM2=" + areaM2 + ", " : "") +
                (tbCropType != null ? "tbCropType=" + tbCropType + ", " : "") +
                (startDate != null ? "startDate=" + startDate + ", " : "") +
                (endDate != null ? "endDate=" + endDate + ", " : "") +
                (status != null ? "status=" + status + ", " : "") +
                (description != null ? "description=" + description + ", " : "") +
                (ageDayStartAt != null ? "ageDayStartAt=" + ageDayStartAt + ", " : "") +
                (createdDate != null ? "createdDate=" + createdDate + ", " : "") +
                (modifiedDate != null ? "modifiedDate=" + modifiedDate + ", " : "") +
                (deletedDate != null ? "deletedDate=" + deletedDate + ", " : "") +
                (tbSuppliesId != null ? "tbSuppliesId=" + tbSuppliesId + ", " : "") +
                (tbGuidelineId != null ? "tbGuidelineId=" + tbGuidelineId + ", " : "") +
                (netHouseId != null ? "netHouseId=" + netHouseId + ", " : "") +
                (createdById != null ? "createdById=" + createdById + ", " : "") +
                (modifiedById != null ? "modifiedById=" + modifiedById + ", " : "") +
                (deletedById != null ? "deletedById=" + deletedById + ", " : "") +
                (tbDetailUserId != null ? "tbDetailUserId=" + tbDetailUserId + ", " : "") +
            "}";
    }

    public StringFilter getTbDetailUserFullName() {
        return tbDetailUserFullName;
    }

    public void setTbDetailUserFullName(StringFilter tbDetailUserFullName) {
        this.tbDetailUserFullName = tbDetailUserFullName;
    }

    public StringFilter getTbSuppliesSku() {
        return tbSuppliesSku;
    }

    public void setTbSuppliesSku(StringFilter tbSuppliesSku) {
        this.tbSuppliesSku = tbSuppliesSku;
    }

    public LongFilter getAreaId() {
        return areaId;
    }

    public void setAreaId(LongFilter areaId) {
        this.areaId = areaId;
    }

    public StringFilter getNetHouseName() {
        return netHouseName;
    }

    public void setNetHouseName(StringFilter netHouseName) {
        this.netHouseName = netHouseName;
    }

    public StringFilter getArea() {
        return area;
    }

    public void setArea(StringFilter area) {
        this.area = area;
    }
}
