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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter address;

    private LongFilter tbCountryId;

    private LongFilter tbCityId;

    private LongFilter tbDistrictId;

    private LongFilter tbWardId;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getAddress() {
        return address;
    }

    public void setAddress(StringFilter address) {
        this.address = address;
    }

    public LongFilter getTbCountryId() {
        return tbCountryId;
    }

    public void setTbCountryId(LongFilter tbCountryId) {
        this.tbCountryId = tbCountryId;
    }

    public LongFilter getTbCityId() {
        return tbCityId;
    }

    public void setTbCityId(LongFilter tbCityId) {
        this.tbCityId = tbCityId;
    }

    public LongFilter getTbDistrictId() {
        return tbDistrictId;
    }

    public void setTbDistrictId(LongFilter tbDistrictId) {
        this.tbDistrictId = tbDistrictId;
    }

    public LongFilter getTbWardId() {
        return tbWardId;
    }

    public void setTbWardId(LongFilter tbWardId) {
        this.tbWardId = tbWardId;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBAddressCriteria that = (TBAddressCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(address, that.address) &&
            Objects.equals(tbCountryId, that.tbCountryId) &&
            Objects.equals(tbCityId, that.tbCityId) &&
            Objects.equals(tbDistrictId, that.tbDistrictId) &&
            Objects.equals(tbWardId, that.tbWardId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        address,
        tbCountryId,
        tbCityId,
        tbDistrictId,
        tbWardId
        );
    }

    @Override
    public String toString() {
        return "TBAddressCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (address != null ? "address=" + address + ", " : "") +
                (tbCountryId != null ? "tbCountryId=" + tbCountryId + ", " : "") +
                (tbCityId != null ? "tbCityId=" + tbCityId + ", " : "") +
                (tbDistrictId != null ? "tbDistrictId=" + tbDistrictId + ", " : "") +
                (tbWardId != null ? "tbWardId=" + tbWardId + ", " : "") +
            "}";
    }

}
