blob: 7d33ddc0570d331ecdbcaeaad89fde5a30e7b6c9 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.apache.nifi.minifi.commons.status.common;
import java.util.Date;
public class BulletinStatus implements java.io.Serializable {
private Date timestamp;
private String message;
public BulletinStatus() {
}
public Date getTimestamp() {
return timestamp;
}
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
BulletinStatus bulletin = (BulletinStatus) o;
if (getTimestamp() != null ? !getTimestamp().equals(bulletin.getTimestamp()) : bulletin.getTimestamp() != null) return false;
return getMessage() != null ? getMessage().equals(bulletin.getMessage()) : bulletin.getMessage() == null;
}
@Override
public int hashCode() {
int result = getTimestamp() != null ? getTimestamp().hashCode() : 0;
result = 31 * result + (getMessage() != null ? getMessage().hashCode() : 0);
return result;
}
@Override
public String toString() {
return "{" +
"timestamp=" + timestamp +
", message='" + message + '\'' +
'}';
}
}