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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter sku;

    private StringFilter name;

    private StringFilter manufacturer;

    private StringFilter specs;

    private InstantFilter createdDate;

    private InstantFilter modifiedDate;

    private InstantFilter deletedDate;

    private LongFilter tbEquipmentTypeId;

    private LongFilter createdById;

    private LongFilter modifiedById;

    private LongFilter deletedById;

    private LongFilter tbCustomerId;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getSku() {
        return sku;
    }

    public void setSku(StringFilter sku) {
        this.sku = sku;
    }

    public StringFilter getName() {
        return name;
    }

    public void setName(StringFilter name) {
        this.name = name;
    }

    public StringFilter getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(StringFilter manufacturer) {
        this.manufacturer = manufacturer;
    }

    public StringFilter getSpecs() {
        return specs;
    }

    public void setSpecs(StringFilter specs) {
        this.specs = specs;
    }

    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 getTbEquipmentTypeId() {
        return tbEquipmentTypeId;
    }

    public void setTbEquipmentTypeId(LongFilter tbEquipmentTypeId) {
        this.tbEquipmentTypeId = tbEquipmentTypeId;
    }

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

    public LongFilter getTbCustomerId() {
        return tbCustomerId;
    }

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


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBEquipmentCriteria that = (TBEquipmentCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(sku, that.sku) &&
            Objects.equals(name, that.name) &&
            Objects.equals(manufacturer, that.manufacturer) &&
            Objects.equals(specs, that.specs) &&
            Objects.equals(createdDate, that.createdDate) &&
            Objects.equals(modifiedDate, that.modifiedDate) &&
            Objects.equals(deletedDate, that.deletedDate) &&
            Objects.equals(tbEquipmentTypeId, that.tbEquipmentTypeId) &&
            Objects.equals(createdById, that.createdById) &&
            Objects.equals(modifiedById, that.modifiedById) &&
            Objects.equals(deletedById, that.deletedById) &&
            Objects.equals(tbCustomerId, that.tbCustomerId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        sku,
        name,
        manufacturer,
        specs,
        createdDate,
        modifiedDate,
        deletedDate,
        tbEquipmentTypeId,
        createdById,
        modifiedById,
        deletedById,
        tbCustomerId
        );
    }

    @Override
    public String toString() {
        return "TBEquipmentCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (sku != null ? "sku=" + sku + ", " : "") +
                (name != null ? "name=" + name + ", " : "") +
                (manufacturer != null ? "manufacturer=" + manufacturer + ", " : "") +
                (specs != null ? "specs=" + specs + ", " : "") +
                (createdDate != null ? "createdDate=" + createdDate + ", " : "") +
                (modifiedDate != null ? "modifiedDate=" + modifiedDate + ", " : "") +
                (deletedDate != null ? "deletedDate=" + deletedDate + ", " : "") +
                (tbEquipmentTypeId != null ? "tbEquipmentTypeId=" + tbEquipmentTypeId + ", " : "") +
                (createdById != null ? "createdById=" + createdById + ", " : "") +
                (modifiedById != null ? "modifiedById=" + modifiedById + ", " : "") +
                (deletedById != null ? "deletedById=" + deletedById + ", " : "") +
                (tbCustomerId != null ? "tbCustomerId=" + tbCustomerId + ", " : "") +
            "}";
    }

}
