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;

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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private DoubleFilter pixelX;

    private DoubleFilter pixelY;

    private LongFilter tbCustomerId;

    private LongFilter tbEntityId;

    public LongFilter getId() {
        return id;
    }

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

    public DoubleFilter getPixelX() {
        return pixelX;
    }

    public void setPixelX(DoubleFilter pixelX) {
        this.pixelX = pixelX;
    }

    public DoubleFilter getPixelY() {
        return pixelY;
    }

    public void setPixelY(DoubleFilter pixelY) {
        this.pixelY = pixelY;
    }

    public LongFilter getTbCustomerId() {
        return tbCustomerId;
    }

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

    public LongFilter getTbEntityId() {
        return tbEntityId;
    }

    public void setTbEntityId(LongFilter tbEntityId) {
        this.tbEntityId = tbEntityId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBEntityLocationOfCustomerCriteria that = (TBEntityLocationOfCustomerCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(pixelX, that.pixelX) &&
            Objects.equals(pixelY, that.pixelY) &&
            Objects.equals(tbCustomerId, that.tbCustomerId) &&
            Objects.equals(tbEntityId, that.tbEntityId) ;
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        pixelX,
        pixelY,
        tbCustomerId,
        tbEntityId
        );
    }

    @Override
    public String toString() {
        return "TBEntityLocationOfCustomerCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (pixelX != null ? "pixelX=" + pixelX + ", " : "") +
                (pixelY != null ? "pixelY=" + pixelY + ", " : "") +
                (tbCustomerId != null ? "tbCustomerId=" + tbCustomerId + ", " : "") +
                (tbEntityId != null ? "tbEntityId=" + tbEntityId + ", " : "") +
            "}";
    }

}
