/**
 * <p>Copyright:Copyright(c) 2017</p>
 * <p>Company:上海中信信息发展股份有限公司</p>
 * <p>包名:com.cesgroup.cesmonitor.bean</p>
 * <p>文件名:EventInfo.java</p>
 * <p>创建时间:2017年6月26日 下午7:32:33</p>
 * <p>作者:Administrator</p>
 */

package com.cesgroup.cesmonitor.bean;

/**
 *
 * @author Administrator
 * @version 1.0.0 2017年6月26日
 */
public class EventInfo implements Comparable<EventInfo> {

    /**
     * 事件发生时间
     */
    private Long startClock;

    /**
     * 状态
     */
    private String status;

    /**
     * 持续时间
     */
    private String subClock;

    /**
     * 时长
     */
    private String duration;

    /**
     * 是否被确认
     */
    private int acknowledged;

    /**
     * @return the startClock
     */
    public Long getStartClock() {
        return startClock;
    }

    /**
     * @param startClock
     *            the startClock to set
     */
    public void setStartClock(Long startClock) {
        this.startClock = startClock;
    }

    /**
     * @return the status
     */
    public String getStatus() {
        return status;
    }

    /**
     * @param status
     *            the status to set
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * @return the subClock
     */
    public String getSubClock() {
        return subClock;
    }

    /**
     * @param subClock
     *            the subClock to set
     */
    public void setSubClock(String subClock) {
        this.subClock = subClock;
    }

    /**
     * @return the acknowledged
     */
    public int getAcknowledged() {
        return acknowledged;
    }

    /**
     * @param acknowledged
     *            the acknowledged to set
     */
    public void setAcknowledged(int acknowledged) {
        this.acknowledged = acknowledged;
    }

    /**
     * @return the duration
     */
    public String getDuration() {
        return duration;
    }

    /**
     * @param duration
     *            the duration to set
     */
    public void setDuration(String duration) {
        this.duration = duration;
    }

    /**
     *
     * @see java.lang.Comparable#compareTo(java.lang.Object)
     */
    @Override
    public int compareTo(EventInfo p) {
        if (this == p) {
            return 0;
        } else if (p != null && p instanceof EventInfo) {
            EventInfo pd = p;
            if (this.startClock > pd.startClock) {
                return -1;
            } else if (this.startClock < pd.startClock) {
                return 1;
            } else {
                return 0;
            }
        } else {
            return -1;
        }
    }

}
