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 TBProductStockUpdate entity. This class is used in TBProductStockUpdateResource 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-stock-updates?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 TBProductStockUpdateCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private InstantFilter updateDate;

    private IntegerFilter action;

    private DoubleFilter quantity;

    private StringFilter description;

    private LongFilter updateBy;

    private LongFilter tbProductBlockDetailsId;

    private LongFilter tbActivityId;

    public LongFilter getId() {
        return id;
    }

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

    public InstantFilter getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(InstantFilter updateDate) {
        this.updateDate = updateDate;
    }

    public IntegerFilter getAction() {
        return action;
    }

    public void setAction(IntegerFilter action) {
        this.action = action;
    }

    public DoubleFilter getQuantity() {
        return quantity;
    }

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

    public StringFilter getDescription() {
        return description;
    }

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

    public LongFilter getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(LongFilter updateBy) {
        this.updateBy = updateBy;
    }

    public LongFilter getTbProductBlockDetailsId() {
        return tbProductBlockDetailsId;
    }

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

    public LongFilter getTbActivityId() {
        return tbActivityId;
    }

    public void setTbActivityId(LongFilter tbActivityId) {
        this.tbActivityId = tbActivityId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBProductStockUpdateCriteria that = (TBProductStockUpdateCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(updateDate, that.updateDate) &&
            Objects.equals(action, that.action) &&
            Objects.equals(quantity, that.quantity) &&
            Objects.equals(description, that.description) &&
            Objects.equals(updateBy, that.updateBy) &&
            Objects.equals(tbProductBlockDetailsId, that.tbProductBlockDetailsId) &&
            Objects.equals(tbActivityId, that.tbActivityId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        updateDate,
        action,
        quantity,
        description,
        updateBy,
        tbProductBlockDetailsId,
        tbActivityId
        );
    }

    @Override
    public String toString() {
        return "TBProductStockUpdateCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (updateDate != null ? "updateDate=" + updateDate + ", " : "") +
                (action != null ? "action=" + action + ", " : "") +
                (quantity != null ? "quantity=" + quantity + ", " : "") +
                (description != null ? "description=" + description + ", " : "") +
                (updateBy != null ? "updateBy=" + updateBy + ", " : "") +
                (tbProductBlockDetailsId != null ? "tbProductBlockDetailsId=" + tbProductBlockDetailsId + ", " : "") +
                (tbActivityId != null ? "tbActivityId=" + tbActivityId + ", " : "") +
            "}";
    }

}
