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 TBSuppliesOrder entity. This class is used in TBSuppliesOrderResource 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-orders?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 TBSuppliesOrderCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter status;

    private InstantFilter orderDate;

    private InstantFilter receiveDate;

    private LongFilter totalPrice;

    private StringFilter description;

    private InstantFilter createdDate;

    private InstantFilter modifiedDate;

    private InstantFilter deletedDate;

    private LongFilter tbVendorId;

    private LongFilter createdById;

    private LongFilter modifiedById;

    private LongFilter deletedById;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getStatus() {
        return status;
    }

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

    public InstantFilter getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(InstantFilter orderDate) {
        this.orderDate = orderDate;
    }

    public InstantFilter getReceiveDate() {
        return receiveDate;
    }

    public void setReceiveDate(InstantFilter receiveDate) {
        this.receiveDate = receiveDate;
    }

    public LongFilter getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(LongFilter totalPrice) {
        this.totalPrice = totalPrice;
    }

    public StringFilter getDescription() {
        return description;
    }

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

    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 getTbVendorId() {
        return tbVendorId;
    }

    public void setTbVendorId(LongFilter tbVendorId) {
        this.tbVendorId = tbVendorId;
    }

    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;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBSuppliesOrderCriteria that = (TBSuppliesOrderCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(status, that.status) &&
            Objects.equals(orderDate, that.orderDate) &&
            Objects.equals(receiveDate, that.receiveDate) &&
            Objects.equals(totalPrice, that.totalPrice) &&
            Objects.equals(description, that.description) &&
            Objects.equals(createdDate, that.createdDate) &&
            Objects.equals(modifiedDate, that.modifiedDate) &&
            Objects.equals(deletedDate, that.deletedDate) &&
            Objects.equals(tbVendorId, that.tbVendorId) &&
            Objects.equals(createdById, that.createdById) &&
            Objects.equals(modifiedById, that.modifiedById) &&
            Objects.equals(deletedById, that.deletedById);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        status,
        orderDate,
        receiveDate,
        totalPrice,
        description,
        createdDate,
        modifiedDate,
        deletedDate,
        tbVendorId,
        createdById,
        modifiedById,
        deletedById
        );
    }

    @Override
    public String toString() {
        return "TBSuppliesOrderCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (status != null ? "status=" + status + ", " : "") +
                (orderDate != null ? "orderDate=" + orderDate + ", " : "") +
                (receiveDate != null ? "receiveDate=" + receiveDate + ", " : "") +
                (totalPrice != null ? "totalPrice=" + totalPrice + ", " : "") +
                (description != null ? "description=" + description + ", " : "") +
                (createdDate != null ? "createdDate=" + createdDate + ", " : "") +
                (modifiedDate != null ? "modifiedDate=" + modifiedDate + ", " : "") +
                (deletedDate != null ? "deletedDate=" + deletedDate + ", " : "") +
                (tbVendorId != null ? "tbVendorId=" + tbVendorId + ", " : "") +
                (createdById != null ? "createdById=" + createdById + ", " : "") +
                (modifiedById != null ? "modifiedById=" + modifiedById + ", " : "") +
                (deletedById != null ? "deletedById=" + deletedById + ", " : "") +
            "}";
    }

}
