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 TBSupplies entity. This class is used in TBSuppliesResource 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?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 TBSuppliesCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter name;

    private StringFilter ingredient;

    private StringFilter use;

    private StringFilter sku;

    private StringFilter description;

    private StringFilter manufacturer;

    private IntegerFilter quarantinePeriod;

    private StringFilter dosage;

    private StringFilter packaging;

    private DoubleFilter jhiSize;

    private StringFilter unit;

    private InstantFilter createdDate;

    private InstantFilter modifiedDate;

    private InstantFilter deletedDate;

    private LongFilter tbSuppliesTypeId;

    private StringFilter tbSuppliesTypeName;

    private LongFilter createdById;

    private LongFilter modifiedById;

    private LongFilter deletedById;

    private LongFilter tbCustomerId;

    private LongFilter tbGuidelineId;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getName() {
        return name;
    }

    public void setName(StringFilter name) {
        this.name = name;
    }

    public StringFilter getIngredient() {
        return ingredient;
    }

    public void setIngredient(StringFilter ingredient) {
        this.ingredient = ingredient;
    }

    public StringFilter getUse() {
        return use;
    }

    public void setUse(StringFilter use) {
        this.use = use;
    }

    public StringFilter getSku() {
        return sku;
    }

    public void setSku(StringFilter sku) {
        this.sku = sku;
    }


    public StringFilter getDescription() {
        return description;
    }

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

    public StringFilter getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(StringFilter manufacturer) {
        this.manufacturer = manufacturer;
    }

    public IntegerFilter getQuarantinePeriod() {
        return quarantinePeriod;
    }

    public void setQuarantinePeriod(IntegerFilter quarantinePeriod) {
        this.quarantinePeriod = quarantinePeriod;
    }

    public StringFilter getDosage() {
        return dosage;
    }

    public void setDosage(StringFilter dosage) {
        this.dosage = dosage;
    }

    public StringFilter getPackaging() {
        return packaging;
    }

    public void setPackaging(StringFilter packaging) {
        this.packaging = packaging;
    }

    public DoubleFilter getJhiSize() {
        return jhiSize;
    }

    public void setJhiSize(DoubleFilter jhiSize) {
        this.jhiSize = jhiSize;
    }

    public StringFilter getUnit() {
        return unit;
    }

    public void setUnit(StringFilter unit) {
        this.unit = unit;
    }

    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 getTbSuppliesTypeId() {
        return tbSuppliesTypeId;
    }

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

    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 getTbCustomerId() {
        return tbCustomerId;
    }

    public void setTbCustomerId(LongFilter tbCustomerId) {
        this.tbCustomerId = tbCustomerId;
    }

    public LongFilter getTbGuidelineId() {
        return tbGuidelineId;
    }

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


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBSuppliesCriteria that = (TBSuppliesCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(name, that.name) &&
            Objects.equals(ingredient, that.ingredient) &&
            Objects.equals(use, that.use) &&
            Objects.equals(sku, that.sku) &&
            Objects.equals(description, that.description) &&
            Objects.equals(manufacturer, that.manufacturer) &&
            Objects.equals(quarantinePeriod, that.quarantinePeriod) &&
            Objects.equals(dosage, that.dosage) &&
            Objects.equals(packaging, that.packaging) &&
            Objects.equals(jhiSize, that.jhiSize) &&
            Objects.equals(unit, that.unit) &&
            Objects.equals(createdDate, that.createdDate) &&
            Objects.equals(modifiedDate, that.modifiedDate) &&
            Objects.equals(deletedDate, that.deletedDate) &&
            Objects.equals(tbSuppliesTypeId, that.tbSuppliesTypeId) &&
            Objects.equals(tbSuppliesTypeName, that.tbSuppliesTypeName) &&
            Objects.equals(createdById, that.createdById) &&
            Objects.equals(modifiedById, that.modifiedById) &&
            Objects.equals(deletedById, that.deletedById) &&
            Objects.equals(tbCustomerId, that.tbCustomerId) &&
            Objects.equals(tbGuidelineId, that.tbGuidelineId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        name,
        ingredient,
        use,
        sku,
        description,
        manufacturer,
        quarantinePeriod,
        dosage,
        packaging,
        jhiSize,
        unit,
        createdDate,
        modifiedDate,
        deletedDate,
        tbSuppliesTypeId,
        tbSuppliesTypeName,
        createdById,
        modifiedById,
        deletedById,
        tbCustomerId,
        tbGuidelineId
        );
    }

    @Override
    public String toString() {
        return "TBSuppliesCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (name != null ? "name=" + name + ", " : "") +
                (ingredient != null ? "ingredient=" + ingredient + ", " : "") +
                (use != null ? "use=" + use + ", " : "") +
                (sku != null ? "sku=" + sku + ", " : "") +
                (description != null ? "description=" + description + ", " : "") +
                (manufacturer != null ? "manufacturer=" + manufacturer + ", " : "") +
                (quarantinePeriod != null ? "quarantinePeriod=" + quarantinePeriod + ", " : "") +
                (dosage != null ? "dosage=" + dosage + ", " : "") +
                (packaging != null ? "packaging=" + packaging + ", " : "") +
                (jhiSize != null ? "jhiSize=" + jhiSize + ", " : "") +
                (unit != null ? "unit=" + unit + ", " : "") +
                (createdDate != null ? "createdDate=" + createdDate + ", " : "") +
                (modifiedDate != null ? "modifiedDate=" + modifiedDate + ", " : "") +
                (deletedDate != null ? "deletedDate=" + deletedDate + ", " : "") +
                (tbSuppliesTypeId != null ? "tbSuppliesTypeId=" + tbSuppliesTypeId + ", " : "") +
                (createdById != null ? "createdById=" + createdById + ", " : "") +
                (modifiedById != null ? "modifiedById=" + modifiedById + ", " : "") +
                (deletedById != null ? "deletedById=" + deletedById + ", " : "") +
                (tbCustomerId != null ? "tbCustomerId=" + tbCustomerId + ", " : "") +
                (tbGuidelineId != null ? "tbGuidelineId=" + tbGuidelineId + ", " : "") +
            "}";
    }

    public StringFilter getTbSuppliesTypeName() {
        return tbSuppliesTypeName;
    }

    public void setTbSuppliesTypeName(StringFilter tbSuppliesTypeName) {
        this.tbSuppliesTypeName = tbSuppliesTypeName;
    }
}
