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 TBStockUpdate entity. This class is used in TBStockUpdateResource to
 * receive all the possible filtering options from the Http GET request parameters.
 * For example the following could be a valid requests:
 * <code> /tb-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 TBStockUpdateCriteria 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 tbSuppliesOrderId;

    private LongFilter tbSuppliesInWarehouseId;

    private LongFilter tbActivityId;

    private LongFilter tbBlockDetailsId;

    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 getTbSuppliesOrderId() {
        return tbSuppliesOrderId;
    }

    public void setTbSuppliesOrderId(LongFilter tbSuppliesOrderId) {
        this.tbSuppliesOrderId = tbSuppliesOrderId;
    }

    public LongFilter getTbSuppliesInWarehouseId() {
        return tbSuppliesInWarehouseId;
    }

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

    public LongFilter getTbActivityId() {
        return tbActivityId;
    }

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

    public LongFilter getTbBlockDetailsId() {
        return tbBlockDetailsId;
    }

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

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBStockUpdateCriteria that = (TBStockUpdateCriteria) 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(tbSuppliesOrderId, that.tbSuppliesOrderId) &&
            Objects.equals(tbSuppliesInWarehouseId, that.tbSuppliesInWarehouseId) &&
            Objects.equals(tbActivityId, that.tbActivityId) &&
            Objects.equals(tbBlockDetailsId, that.tbBlockDetailsId);

    }

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

    @Override
    public String toString() {
        return "TBStockUpdateCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (updateDate != null ? "updateDate=" + updateDate + ", " : "") +
                (action != null ? "action=" + action + ", " : "") +
                (quantity != null ? "quantity=" + quantity + ", " : "") +
                (description != null ? "description=" + description + ", " : "") +
                (tbSuppliesOrderId != null ? "tbSuppliesOrderId=" + tbSuppliesOrderId + ", " : "") +
                (tbSuppliesInWarehouseId != null ? "tbSuppliesInWarehouseId=" + tbSuppliesInWarehouseId + ", " : "") +
                (tbActivityId != null ? "tbActivityId=" + tbActivityId + ", " : "") +
                (tbBlockDetailsId != null ? "tbBlockDetailsId=" + tbBlockDetailsId + ", " : "") +
            "}";
    }

}
