package vn.azteam.tpf.service.dto;

import java.io.Serializable;
import java.util.Objects;

import io.github.jhipster.service.filter.*;

/**
 * Criteria class for the TBActivityExtendType entity. This class is used in TBActivityExtendTypeResource to
 * receive all the possible filtering options from the Http GET request parameters.
 * For example the following could be a valid requests:
 * <code> /tb-activity-extend-types?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 TBActivityExtendTypeCriteria implements Serializable {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private StringFilter name;

    private StringFilter externalTable;

    private IntegerFilter objectType;

    private StringFilter condition;

    private LongFilter activityTypeId;

    private BooleanFilter isGuidelineUsing;

    private InstantFilter createdDate;

    private InstantFilter modifiedDate;

    private InstantFilter deletedDate;

    private LongFilter deletedById;

    private LongFilter createdById;

    private LongFilter modifiedById;

    public LongFilter getId() {
        return id;
    }

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

    public StringFilter getName() {
        return name;
    }

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

    public StringFilter getExternalTable() {
        return externalTable;
    }

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

    public IntegerFilter getObjectType() {
        return objectType;
    }

    public void setObjectType(IntegerFilter objectType) {
        this.objectType = objectType;
    }

    public StringFilter getCondition() {
        return condition;
    }

    public void setCondition(StringFilter condition) {
        this.condition = condition;
    }

    public LongFilter getActivityTypeId() {
        return activityTypeId;
    }

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

    public BooleanFilter getIsGuidelineUsing() {
        return isGuidelineUsing;
    }

    public void setIsGuidelineUsing(BooleanFilter isGuidelineUsing) {
        this.isGuidelineUsing = isGuidelineUsing;
    }

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

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TBActivityExtendTypeCriteria that = (TBActivityExtendTypeCriteria) o;
        return
            Objects.equals(id, that.id) &&
            Objects.equals(name, that.name) &&
            Objects.equals(externalTable, that.externalTable) &&
            Objects.equals(objectType, that.objectType) &&
            Objects.equals(condition, that.condition) &&
            Objects.equals(activityTypeId, that.activityTypeId) &&
            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(isGuidelineUsing, that.isGuidelineUsing);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
        id,
        name,
        externalTable,
        objectType,
        condition,
        activityTypeId,
        createdDate,
        modifiedDate,
        deletedDate,
        deletedById,
        createdById,
        modifiedById,
        isGuidelineUsing
        );
    }

    @Override
    public String toString() {
        return "TBActivityExtendTypeCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (name != null ? "name=" + name + ", " : "") +
                (externalTable != null ? "externalTable=" + externalTable + ", " : "") +
                (objectType != null ? "objectType=" + objectType + ", " : "") +
                (condition != null ? "condition=" + condition + ", " : "") +
                (activityTypeId != null ? "activityTypeId=" + activityTypeId + ", " : "") +
                (createdDate != null ? "createdDate=" + createdDate + ", " : "") +
                (modifiedDate != null ? "modifiedDate=" + modifiedDate + ", " : "") +
                (deletedDate != null ? "deletedDate=" + deletedDate + ", " : "") +
                (deletedById != null ? "deletedById=" + deletedById + ", " : "") +
                (createdById != null ? "createdById=" + createdById + ", " : "") +
                (modifiedById != null ? "modifiedById=" + modifiedById + ", " : "") +
                (isGuidelineUsing != null ? "isGuidelineUsing=" + isGuidelineUsing + ", " : "") +
            "}";
    }

}
