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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter description;

    private IntegerFilter isRepeat;

    private StringFilter repeatEvery;

    private IntegerFilter isRepeatOnSunday;

    private IntegerFilter isRepeatOnMonday;

    private IntegerFilter isRepeatOnTuesday;

    private IntegerFilter isRepeatOnWednesday;

    private IntegerFilter isRepeatOnThursday;

    private IntegerFilter isRepeatOnFriday;

    private IntegerFilter isRepeatOnSaturday;

    private IntegerFilter dayOfMonth;

    private InstantFilter endsOn;

    private IntegerFilter endsAfterXOccurrences;

    private InstantFilter createdDate;

    private InstantFilter modifiedDate;

    private InstantFilter deletedDate;

    private LongFilter createdById;

    private LongFilter modifiedById;

    private LongFilter deletedById;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getDescription() {
        return description;
    }

    public void setDescription(StringFilter description) {
        this.description = description;
    }

    public IntegerFilter getIsRepeat() {
        return isRepeat;
    }

    public void setIsRepeat(IntegerFilter isRepeat) {
        this.isRepeat = isRepeat;
    }

    public StringFilter getRepeatEvery() {
        return repeatEvery;
    }

    public void setRepeatEvery(StringFilter repeatEvery) {
        this.repeatEvery = repeatEvery;
    }

    public IntegerFilter getIsRepeatOnSunday() {
        return isRepeatOnSunday;
    }

    public void setIsRepeatOnSunday(IntegerFilter isRepeatOnSunday) {
        this.isRepeatOnSunday = isRepeatOnSunday;
    }

    public IntegerFilter getIsRepeatOnMonday() {
        return isRepeatOnMonday;
    }

    public void setIsRepeatOnMonday(IntegerFilter isRepeatOnMonday) {
        this.isRepeatOnMonday = isRepeatOnMonday;
    }

    public IntegerFilter getIsRepeatOnTuesday() {
        return isRepeatOnTuesday;
    }

    public void setIsRepeatOnTuesday(IntegerFilter isRepeatOnTuesday) {
        this.isRepeatOnTuesday = isRepeatOnTuesday;
    }

    public IntegerFilter getIsRepeatOnWednesday() {
        return isRepeatOnWednesday;
    }

    public void setIsRepeatOnWednesday(IntegerFilter isRepeatOnWednesday) {
        this.isRepeatOnWednesday = isRepeatOnWednesday;
    }

    public IntegerFilter getIsRepeatOnThursday() {
        return isRepeatOnThursday;
    }

    public void setIsRepeatOnThursday(IntegerFilter isRepeatOnThursday) {
        this.isRepeatOnThursday = isRepeatOnThursday;
    }

    public IntegerFilter getIsRepeatOnFriday() {
        return isRepeatOnFriday;
    }

    public void setIsRepeatOnFriday(IntegerFilter isRepeatOnFriday) {
        this.isRepeatOnFriday = isRepeatOnFriday;
    }

    public IntegerFilter getIsRepeatOnSaturday() {
        return isRepeatOnSaturday;
    }

    public void setIsRepeatOnSaturday(IntegerFilter isRepeatOnSaturday) {
        this.isRepeatOnSaturday = isRepeatOnSaturday;
    }

    public IntegerFilter getDayOfMonth() {
        return dayOfMonth;
    }

    public void setDayOfMonth(IntegerFilter dayOfMonth) {
        this.dayOfMonth = dayOfMonth;
    }

    public InstantFilter getEndsOn() {
        return endsOn;
    }

    public void setEndsOn(InstantFilter endsOn) {
        this.endsOn = endsOn;
    }

    public IntegerFilter getEndsAfterXOccurrences() {
        return endsAfterXOccurrences;
    }

    public void setEndsAfterXOccurrences(IntegerFilter endsAfterXOccurrences) {
        this.endsAfterXOccurrences = endsAfterXOccurrences;
    }

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


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBMaintenanceScheduleCriteria that = (TBMaintenanceScheduleCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(description, that.description) &&
            Objects.equals(isRepeat, that.isRepeat) &&
            Objects.equals(repeatEvery, that.repeatEvery) &&
            Objects.equals(isRepeatOnSunday, that.isRepeatOnSunday) &&
            Objects.equals(isRepeatOnMonday, that.isRepeatOnMonday) &&
            Objects.equals(isRepeatOnTuesday, that.isRepeatOnTuesday) &&
            Objects.equals(isRepeatOnWednesday, that.isRepeatOnWednesday) &&
            Objects.equals(isRepeatOnThursday, that.isRepeatOnThursday) &&
            Objects.equals(isRepeatOnFriday, that.isRepeatOnFriday) &&
            Objects.equals(isRepeatOnSaturday, that.isRepeatOnSaturday) &&
            Objects.equals(dayOfMonth, that.dayOfMonth) &&
            Objects.equals(endsOn, that.endsOn) &&
            Objects.equals(endsAfterXOccurrences, that.endsAfterXOccurrences) &&
            Objects.equals(createdDate, that.createdDate) &&
            Objects.equals(modifiedDate, that.modifiedDate) &&
            Objects.equals(deletedDate, that.deletedDate) &&
            Objects.equals(createdById, that.createdById) &&
            Objects.equals(modifiedById, that.modifiedById) &&
            Objects.equals(deletedById, that.deletedById);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        description,
        isRepeat,
        repeatEvery,
        isRepeatOnSunday,
        isRepeatOnMonday,
        isRepeatOnTuesday,
        isRepeatOnWednesday,
        isRepeatOnThursday,
        isRepeatOnFriday,
        isRepeatOnSaturday,
        dayOfMonth,
        endsOn,
        endsAfterXOccurrences,
        createdDate,
        modifiedDate,
        deletedDate,
        createdById,
        modifiedById,
        deletedById
        );
    }

    @Override
    public String toString() {
        return "TBMaintenanceScheduleCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (description != null ? "description=" + description + ", " : "") +
                (isRepeat != null ? "isRepeat=" + isRepeat + ", " : "") +
                (repeatEvery != null ? "repeatEvery=" + repeatEvery + ", " : "") +
                (isRepeatOnSunday != null ? "isRepeatOnSunday=" + isRepeatOnSunday + ", " : "") +
                (isRepeatOnMonday != null ? "isRepeatOnMonday=" + isRepeatOnMonday + ", " : "") +
                (isRepeatOnTuesday != null ? "isRepeatOnTuesday=" + isRepeatOnTuesday + ", " : "") +
                (isRepeatOnWednesday != null ? "isRepeatOnWednesday=" + isRepeatOnWednesday + ", " : "") +
                (isRepeatOnThursday != null ? "isRepeatOnThursday=" + isRepeatOnThursday + ", " : "") +
                (isRepeatOnFriday != null ? "isRepeatOnFriday=" + isRepeatOnFriday + ", " : "") +
                (isRepeatOnSaturday != null ? "isRepeatOnSaturday=" + isRepeatOnSaturday + ", " : "") +
                (dayOfMonth != null ? "dayOfMonth=" + dayOfMonth + ", " : "") +
                (endsOn != null ? "endsOn=" + endsOn + ", " : "") +
                (endsAfterXOccurrences != null ? "endsAfterXOccurrences=" + endsAfterXOccurrences + ", " : "") +
                (createdDate != null ? "createdDate=" + createdDate + ", " : "") +
                (modifiedDate != null ? "modifiedDate=" + modifiedDate + ", " : "") +
                (deletedDate != null ? "deletedDate=" + deletedDate + ", " : "") +
                (createdById != null ? "createdById=" + createdById + ", " : "") +
                (modifiedById != null ? "modifiedById=" + modifiedById + ", " : "") +
                (deletedById != null ? "deletedById=" + deletedById + ", " : "") +
            "}";
    }

}
