/* * Copyright 2013 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.overlord.rtgov.ui.client.model; import java.util.Date; import org.jboss.errai.common.client.api.annotations.Portable; /** * A simple data bean for a situation event. * * @author eric.wittmann@redhat.com */ @Portable public class SituationEventBean { private String situationId; private String severity; private String type; private String subject; private Date timestamp; /** * Constructor. */ public SituationEventBean() { } /** * @return the situationId */ public String getSituationId() { return situationId; } /** * @return the severity */ public String getSeverity() { return severity; } /** * @return the type */ public String getType() { return type; } /** * @return the subject */ public String getSubject() { return subject; } /** * @return the timestamp */ public Date getTimestamp() { return timestamp; } /** * @param situationId the situationId to set */ public void setSituationId(String situationId) { this.situationId = situationId; } /** * @param severity the severity to set */ public void setSeverity(String severity) { this.severity = severity; } /** * @param type the type to set */ public void setType(String type) { this.type = type; } /** * @param subject the subject to set */ public void setSubject(String subject) { this.subject = subject; } /** * @param timestamp the timestamp to set */ public void setTimestamp(Date timestamp) { this.timestamp = timestamp; } /** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((situationId == null) ? 0 : situationId.hashCode()); return result; } /** * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SituationEventBean other = (SituationEventBean) obj; if (situationId == null) { if (other.situationId != null) return false; } else if (!situationId.equals(other.situationId)) return false; return true; } }