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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private IntegerFilter ageDay;

    private LongFilter cropId;

    private DoubleFilter totalCost;

    private StringFilter media;

    private StringFilter externalTable;

    private InstantFilter executeDate;

    private StringFilter description;

    private InstantFilter createdDate;

    private InstantFilter modifiedDate;

    private InstantFilter deletedDate;

    private LongFilter deletedById;

    private LongFilter createdById;

    private LongFilter modifiedById;

    private LongFilter activityTypeId;

    public LongFilter getId() {
        return id;
    }

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

    public IntegerFilter getAgeDay() {
        return ageDay;
    }

    public void setAgeDay(IntegerFilter ageDay) {
        this.ageDay = ageDay;
    }

    public LongFilter getCropId() {
        return cropId;
    }

    public void setCropId(LongFilter cropId) {
        this.cropId = cropId;
    }

    public DoubleFilter getTotalCost() {
        return totalCost;
    }

    public void setTotalCost(DoubleFilter totalCost) {
        this.totalCost = totalCost;
    }

    public StringFilter getMedia() {
        return media;
    }

    public void setMedia(StringFilter media) {
        this.media = media;
    }

    public StringFilter getExternalTable() {
        return externalTable;
    }

    public void setExternalTable(StringFilter externalTable) {
        this.externalTable = externalTable;
    }

    public InstantFilter getExecuteDate() {
        return executeDate;
    }

    public void setExecuteDate(InstantFilter executeDate) {
        this.executeDate = executeDate;
    }

    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 getDeletedById() {
        return deletedById;
    }

    public void setDeletedById(LongFilter deletedById) {
        this.deletedById = deletedById;
    }

    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 getActivityTypeId() {
        return activityTypeId;
    }

    public void setActivityTypeId(LongFilter activityTypeId) {
        this.activityTypeId = activityTypeId;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBActivityCriteria that = (TBActivityCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(ageDay, that.ageDay) &&
            Objects.equals(cropId, that.cropId) &&
            Objects.equals(totalCost, that.totalCost) &&
            Objects.equals(media, that.media) &&
            Objects.equals(externalTable, that.externalTable) &&
            Objects.equals(executeDate, that.executeDate) &&
            Objects.equals(description, that.description) &&
            Objects.equals(createdDate, that.createdDate) &&
            Objects.equals(modifiedDate, that.modifiedDate) &&
            Objects.equals(deletedDate, that.deletedDate) &&
            Objects.equals(deletedById, that.deletedById) &&
            Objects.equals(createdById, that.createdById) &&
            Objects.equals(modifiedById, that.modifiedById) &&
            Objects.equals(activityTypeId, that.activityTypeId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        ageDay,
        cropId,
        totalCost,
        media,
        externalTable,
        executeDate,
        description,
        createdDate,
        modifiedDate,
        deletedDate,
        deletedById,
        createdById,
        modifiedById,
        activityTypeId
        );
    }

    @Override
    public String toString() {
        return "TBActivityCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (ageDay != null ? "ageDay=" + ageDay + ", " : "") +
                (cropId != null ? "cropId=" + cropId + ", " : "") +
                (totalCost != null ? "totalCost=" + totalCost + ", " : "") +
                (media != null ? "media=" + media + ", " : "") +
                (externalTable != null ? "externalTable=" + externalTable + ", " : "") +
                (executeDate != null ? "executeDate=" + executeDate + ", " : "") +
                (description != null ? "description=" + description + ", " : "") +
                (createdDate != null ? "createdDate=" + createdDate + ", " : "") +
                (modifiedDate != null ? "modifiedDate=" + modifiedDate + ", " : "") +
                (deletedDate != null ? "deletedDate=" + deletedDate + ", " : "") +
                (deletedById != null ? "deletedById=" + deletedById + ", " : "") +
                (createdById != null ? "createdById=" + createdById + ", " : "") +
                (modifiedById != null ? "modifiedById=" + modifiedById + ", " : "") +
                (activityTypeId != null ? "activityTypeId=" + activityTypeId + ", " : "") +
            "}";
    }

}
