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

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter channel;

    private LongFilter sendFrom;

    private LongFilter sendTo;

    private StringFilter subject;

    private StringFilter message;

    private StringFilter status;

    private LongFilter tbCropId;

    private LongFilter tbEntityId;

    private StringFilter clickAction;

    private StringFilter contents;

    private InstantFilter createdDate;

    private InstantFilter sendDate;

    private IntegerFilter isRead;

    private IntegerFilter isTestMessage;

    private StringFilter type;

    private LongFilter externalId;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getChannel() {
        return channel;
    }

    public void setChannel(StringFilter channel) {
        this.channel = channel;
    }

    public LongFilter getSendFrom() {
        return sendFrom;
    }

    public void setSendFrom(LongFilter sendFrom) {
        this.sendFrom = sendFrom;
    }

    public LongFilter getSendTo() {
        return sendTo;
    }

    public void setSendTo(LongFilter sendTo) {
        this.sendTo = sendTo;
    }

    public StringFilter getSubject() {
        return subject;
    }

    public void setSubject(StringFilter subject) {
        this.subject = subject;
    }

    public StringFilter getMessage() {
        return message;
    }

    public void setMessage(StringFilter message) {
        this.message = message;
    }

    public StringFilter getStatus() {
        return status;
    }

    public void setStatus(StringFilter status) {
        this.status = status;
    }

    public LongFilter getTbCropId() {
        return tbCropId;
    }

    public void setTbCropId(LongFilter tbCropId) {
        this.tbCropId = tbCropId;
    }

    public LongFilter getTbEntityId() {
        return tbEntityId;
    }

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

    public StringFilter getClickAction() {
        return clickAction;
    }

    public void setClickAction(StringFilter clickAction) {
        this.clickAction = clickAction;
    }

    public StringFilter getContents() {
        return contents;
    }

    public void setContents(StringFilter contents) {
        this.contents = contents;
    }

    public InstantFilter getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(InstantFilter createdDate) {
        this.createdDate = createdDate;
    }

    public InstantFilter getSendDate() {
        return sendDate;
    }

    public void setSendDate(InstantFilter sendDate) {
        this.sendDate = sendDate;
    }

    public IntegerFilter getIsRead() {
        return isRead;
    }

    public void setIsRead(IntegerFilter isRead) {
        this.isRead = isRead;
    }

    public IntegerFilter getIsTestMessage() {
        return isTestMessage;
    }

    public void setIsTestMessage(IntegerFilter isTestMessage) {
        this.isTestMessage = isTestMessage;
    }

    public StringFilter getType() {
        return type;
    }

    public void setType(StringFilter type) {
        this.type = type;
    }

    public LongFilter getExternalId() {
        return externalId;
    }

    public void setExternalId(LongFilter externalId) {
        this.externalId = externalId;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBNotificationCriteria that = (TBNotificationCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(channel, that.channel) &&
            Objects.equals(sendFrom, that.sendFrom) &&
            Objects.equals(sendTo, that.sendTo) &&
            Objects.equals(subject, that.subject) &&
            Objects.equals(message, that.message) &&
            Objects.equals(status, that.status) &&
            Objects.equals(tbCropId, that.tbCropId) &&
            Objects.equals(tbEntityId, that.tbEntityId) &&
            Objects.equals(clickAction, that.clickAction) &&
            Objects.equals(contents, that.contents) &&
            Objects.equals(createdDate, that.createdDate) &&
            Objects.equals(sendDate, that.sendDate) &&
            Objects.equals(isRead, that.isRead) &&
            Objects.equals(isTestMessage, that.isTestMessage) &&
            Objects.equals(type, that.type) &&
            Objects.equals(externalId, that.externalId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        channel,
        sendFrom,
        sendTo,
        subject,
        message,
        status,
        tbCropId,
        tbEntityId,
        clickAction,
        contents,
        createdDate,
        sendDate,
        isRead,
        isTestMessage,
        type,
        externalId
        );
    }

    @Override
    public String toString() {
        return "TBNotificationCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (channel != null ? "channel=" + channel + ", " : "") +
                (sendFrom != null ? "sendFrom=" + sendFrom + ", " : "") +
                (sendTo != null ? "sendTo=" + sendTo + ", " : "") +
                (subject != null ? "subject=" + subject + ", " : "") +
                (message != null ? "message=" + message + ", " : "") +
                (status != null ? "status=" + status + ", " : "") +
                (tbCropId != null ? "tbCropId=" + tbCropId + ", " : "") +
                (tbEntityId != null ? "tbEntityId=" + tbEntityId + ", " : "") +
                (clickAction != null ? "clickAction=" + clickAction + ", " : "") +
                (contents != null ? "contents=" + contents + ", " : "") +
                (createdDate != null ? "createdDate=" + createdDate + ", " : "") +
                (sendDate != null ? "sendDate=" + sendDate + ", " : "") +
                (isRead != null ? "isRead=" + isRead + ", " : "") +
                (isTestMessage != null ? "isTestMessage=" + isTestMessage + ", " : "") +
                (type != null ? "type=" + type + ", " : "") +
                (externalId != null ? "externalId=" + externalId + ", " : "") +
            "}";
    }

}
