package com.njcn.product.advance.eventSource.pojo.dto.eventAggregate;



public class EntityGroupEvtData implements Cloneable,Comparable<EntityGroupEvtData> {
    //逻辑节点序号
    private int node;
    //事件开始时间时标
    private int start_time;
    //类别
    private int cata;
    //标注类别
    private int cata2;
    //物理节点
    private String nodePhysics;

    private SagEvent sagEvent;

    private String sagReason;

    public EntityGroupEvtData(String nodePhysics, int start_time, int cata, int cata2,SagEvent sagEvent,String sagReason) {
        this.nodePhysics = nodePhysics;
        this.start_time = start_time;
        this.cata = cata;
        this.cata2 = cata2;
        this.sagEvent = sagEvent;
        this.sagReason = sagReason;
    }

    public SagEvent getSagEvent() {
        return sagEvent;
    }

    public void setSagEvent(SagEvent sagEvent) {
        this.sagEvent = sagEvent;
    }

    public String getNodePhysics() {
        return nodePhysics;
    }

    public void setNodePhysics(String nodePhysics) {
        this.nodePhysics = nodePhysics;
    }

    public int getNode() {
        return node;
    }

    public void setNode(int node) {
        this.node = node;
    }

    public int getStart_time() {
        return start_time;
    }

    public void setStart_time(int start_time) {
        this.start_time = start_time;
    }

    public int getCata() {
        return cata;
    }

    public void setCata(int cata) {
        this.cata = cata;
    }

    public int getCata2() {
        return cata2;
    }

    public void setCata2(int cata2) {
        this.cata2 = cata2;
    }

    public String getSagReason() {
        return sagReason;
    }

    public void setSagReason(String sagReason) {
        this.sagReason = sagReason;
    }


    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    public Object objClone() {
        try {
            return clone();
        } catch (CloneNotSupportedException e) {
            return new EntityGroupEvtData("-1", -1, -1, -1,null,null);
        }
    }

    @Override
    public String toString() {
        return "EntityGroupEvtData{" +
                "node=" + node +
                ", start_time=" + start_time +
                ", cata=" + cata +
                ", cata2=" + cata2 +
                '}';
    }

    @Override
    public int compareTo(EntityGroupEvtData obj) {
        if(this.getStart_time() < obj.getStart_time()){
            return -1;
        }else if(this.getStart_time() > obj.getStart_time()){
            return 1;
        }

        return 0;
    }
}