package com.cesgroup.cesmonitor.bean;
/**
 *
 * @author user
 *
 */

public class AlarmInfo implements Comparable<AlarmInfo> {

    private Integer eventid;

    private int groupId;

    private int hostId;

    private int objectId;

    private Long startClock;

    private String subClock;

    private Integer source;

    private Integer object;

    private String description;

    private Integer status;

    private Integer warningLevel;

    private String duration;

    private Integer totalRecord;

    private String hostName;

    private Integer hostType;

    public Integer getObject() {
        return object;
    }

    public void setObject(final Integer object) {
        this.object = object;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(final Integer source) {
        this.source = source;
    }

    public String getSubClock() {
        return subClock;
    }

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

    public Integer getEventid() {
        return eventid;
    }

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

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(final int groupId) {
        this.groupId = groupId;
    }

    public int getHostId() {
        return hostId;
    }

    public void setHostId(final int hostId) {
        this.hostId = hostId;
    }

    public int getObjectId() {
        return objectId;
    }

    public void setObjectId(final int objectId) {
        this.objectId = objectId;
    }

    public Long getStartClock() {
        return startClock;
    }

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

    public String getDescription() {
        return description;
    }

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

    public Integer getStatus() {
        return status;
    }

    public void setStatus(final Integer status) {
        this.status = status;
    }

    public Integer getWarningLevel() {
        return warningLevel;
    }

    public void setWarningLevel(final Integer warningLevel) {
        this.warningLevel = warningLevel;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(final String duration) {
        this.duration = duration;
    }

    public Integer getTotalRecord() {
        return totalRecord;
    }

    public void setTotalRecord(final Integer totalRecord) {
        this.totalRecord = totalRecord;
    }

    @Override
    public int compareTo(final AlarmInfo p) {
        if (this == p) {
            return 0;
        } else if (p != null && p instanceof AlarmInfo) {
            final AlarmInfo pd = p;
            if (this.startClock > pd.startClock) {
                return -1;
            } else if (this.startClock < pd.startClock) {
                return 1;
            } else {
                return 0;
            }
        } else {
            return -1;
        }
    }

    public String getHostName() {
        return hostName;
    }

    public void setHostName(final String hostName) {
        this.hostName = hostName;
    }

    public Integer getHostType() {
        return hostType;
    }

    public void setHostType(final Integer hostType) {
        this.hostType = hostType;
    }

    @Override
    public String toString() {
        return "AlarmInfo [eventid=" + eventid + ", groupId=" + groupId + ", hostId=" + hostId + ", objectId="
            + objectId + ", startClock=" + startClock + ", subClock=" + subClock + ", source=" + source + ", object="
            + object + ", description=" + description + ", status=" + status + ", warningLevel=" + warningLevel
            + ", duration=" + duration + ", totalRecord=" + totalRecord + ", hostName=" + hostName + ", hostType="
            + hostType + "]";
    }

}
