package vn.azteam.tpf.service.dto;

import java.io.Serializable;
import java.util.Objects;

import io.github.jhipster.service.filter.*;

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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter event;

    private InstantFilter dateOccurred;

    private IntegerFilter status;

    private LongFilter tbCommandId;

    private LongFilter tbDetailUserId;

    private LongFilter tbEquipmentOfCustomerId;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getEvent() {
        return event;
    }

    public void setEvent(StringFilter event) {
        this.event = event;
    }

    public InstantFilter getDateOccurred() {
        return dateOccurred;
    }

    public void setDateOccurred(InstantFilter dateOccurred) {
        this.dateOccurred = dateOccurred;
    }

    public IntegerFilter getStatus() {
        return status;
    }

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

    public LongFilter getTbCommandId() {
        return tbCommandId;
    }

    public void setTbCommandId(LongFilter tbCommandId) {
        this.tbCommandId = tbCommandId;
    }

    public LongFilter getTbEquipmentOfCustomerId() {
        return tbEquipmentOfCustomerId;
    }

    public void setTbEquipmentOfCustomerId(LongFilter tbEquipmentOfCustomerId) {
        this.tbEquipmentOfCustomerId = tbEquipmentOfCustomerId;
    }

    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 TBEquipmentHistoryCriteria that = (TBEquipmentHistoryCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(event, that.event) &&
            Objects.equals(dateOccurred, that.dateOccurred) &&
            Objects.equals(status, that.status) &&
            Objects.equals(tbCommandId, that.tbCommandId) &&
            Objects.equals(tbEquipmentOfCustomerId, that.tbEquipmentOfCustomerId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        event,
        dateOccurred,
        status,
        tbCommandId,
        tbDetailUserId,
        tbEquipmentOfCustomerId
        );
    }

    @Override
    public String toString() {
        return "TBEquipmentHistoryCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (event != null ? "event=" + event + ", " : "") +
                (dateOccurred != null ? "dateOccurred=" + dateOccurred + ", " : "") +
                (status != null ? "status=" + status + ", " : "") +
                (tbCommandId != null ? "tbCommandId=" + tbCommandId + ", " : "") +
                (tbDetailUserId != null ? "tbDetailUserId=" + tbDetailUserId + ", " : "") +
                (tbEquipmentOfCustomerId != null ? "tbEquipmentOfCustomerId=" + tbEquipmentOfCustomerId + ", " : "") +
            "}";
    }

}
