package com.cesgroup.cesmonitor.screenbean;

import java.io.Serializable;

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

    private static final long serialVersionUID = 4384858165281767736L;

    private Integer objectid;

    private String host;

    private Integer priority;

    private String description;

    private Long startClock;

    private Long endClock;

    private String subClock;

    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 Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public Integer getObjectid() {
        return objectid;
    }

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

    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 PriorityDetailScreen() {
        super();
    }

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