package com.cesgroup.cesmonitor.bean;

import java.io.Serializable;

/**
 * @author user
 * @version 1.0.0 2017年5月10日
 */
public class PriorityDetail implements Serializable, Comparable<PriorityDetail> {

    private static final long serialVersionUID = 4384858165281767736L;

    private long eventid;

    private Integer objectid;

    private String host;

    private String name;

    private String description;

    private int acknowledged;

    private Long startClock;

    private Long endClock;

    private String subClock;

    public Integer getObjectid() {
        return objectid;
    }

    public void setObjectid(Integer objectid) {
        this.objectid = objectid;
    }

    public long getEventid() {
        return eventid;
    }

    public void setEventid(long eventid) {
        this.eventid = eventid;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getDescription() {
        return description;
    }

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

    public int getAcknowledged() {
        return acknowledged;
    }

    public void setAcknowledged(int acknowledged) {
        this.acknowledged = acknowledged;
    }

    public Long getStartClock() {
        return startClock;
    }

    public void setStartClock(Long startClock) {
        this.startClock = startClock;
    }

    public Long getEndClock() {
        return endClock;
    }

    public void setEndClock(Long endClock) {
        this.endClock = endClock;
    }

    public String getSubClock() {
        return subClock;
    }

    public void setSubClock(String subClock) {
        this.subClock = subClock;
    }

    public String getName() {
        return name;
    }

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

    public PriorityDetail() {
        super();
    }

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