|
|
@ -19,6 +19,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.apache.dolphinscheduler.alert.api; |
|
|
|
package org.apache.dolphinscheduler.alert.api; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* alert data |
|
|
|
|
|
|
|
*/ |
|
|
|
public class AlertData { |
|
|
|
public class AlertData { |
|
|
|
private int id; |
|
|
|
private int id; |
|
|
|
private String title; |
|
|
|
private String title; |
|
|
@ -85,6 +90,7 @@ public class AlertData { |
|
|
|
this.warnType = warnType; |
|
|
|
this.warnType = warnType; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean equals(final Object o) { |
|
|
|
public boolean equals(final Object o) { |
|
|
|
if (o == this) { |
|
|
|
if (o == this) { |
|
|
|
return true; |
|
|
|
return true; |
|
|
@ -93,7 +99,7 @@ public class AlertData { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
final AlertData other = (AlertData) o; |
|
|
|
final AlertData other = (AlertData) o; |
|
|
|
if (!other.canEqual((Object) this)) { |
|
|
|
if (!other.canEqual(this)) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.getId() != other.getId()) { |
|
|
|
if (this.getId() != other.getId()) { |
|
|
@ -102,42 +108,41 @@ public class AlertData { |
|
|
|
if (this.getWarnType() != other.getWarnType()) { |
|
|
|
if (this.getWarnType() != other.getWarnType()) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
final Object this$title = this.getTitle(); |
|
|
|
final Object thisTitle = this.getTitle(); |
|
|
|
final Object other$title = other.getTitle(); |
|
|
|
final Object otherTitle = other.getTitle(); |
|
|
|
if (this$title == null ? other$title != null : !this$title.equals(other$title)) { |
|
|
|
if (!Objects.equals(thisTitle, otherTitle)) { |
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
final Object this$content = this.getContent(); |
|
|
|
|
|
|
|
final Object other$content = other.getContent(); |
|
|
|
|
|
|
|
if (this$content == null ? other$content != null : !this$content.equals(other$content)) { |
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
final Object this$log = this.getLog(); |
|
|
|
final Object thisContent = this.getContent(); |
|
|
|
final Object other$log = other.getLog(); |
|
|
|
final Object otherContent = other.getContent(); |
|
|
|
if (this$log == null ? other$log != null : !this$log.equals(other$log)) { |
|
|
|
if (!Objects.equals(thisContent, otherContent)) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
final Object thisLog = this.getLog(); |
|
|
|
|
|
|
|
final Object otherLog = other.getLog(); |
|
|
|
|
|
|
|
return Objects.equals(thisLog, otherLog); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected boolean canEqual(final Object other) { |
|
|
|
protected boolean canEqual(final Object other) { |
|
|
|
return other instanceof AlertData; |
|
|
|
return other instanceof AlertData; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public int hashCode() { |
|
|
|
public int hashCode() { |
|
|
|
final int PRIME = 59; |
|
|
|
final int prime = 59; |
|
|
|
int result = 1; |
|
|
|
int result = 1; |
|
|
|
result = result * PRIME + this.getId(); |
|
|
|
result = result * prime + this.getId(); |
|
|
|
result = result * PRIME + this.getWarnType(); |
|
|
|
result = result * prime + this.getWarnType(); |
|
|
|
final Object $title = this.getTitle(); |
|
|
|
final Object title = this.getTitle(); |
|
|
|
result = result * PRIME + ($title == null ? 43 : $title.hashCode()); |
|
|
|
result = result * prime + (title == null ? 43 : title.hashCode()); |
|
|
|
final Object $content = this.getContent(); |
|
|
|
final Object content = this.getContent(); |
|
|
|
result = result * PRIME + ($content == null ? 43 : $content.hashCode()); |
|
|
|
result = result * prime + (content == null ? 43 : content.hashCode()); |
|
|
|
final Object $log = this.getLog(); |
|
|
|
final Object log = this.getLog(); |
|
|
|
result = result * PRIME + ($log == null ? 43 : $log.hashCode()); |
|
|
|
result = result * prime + (log == null ? 43 : log.hashCode()); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|
return "AlertData(id=" + this.getId() + ", title=" + this.getTitle() + ", content=" + this.getContent() + ", log=" + this.getLog() + ", warnType=" + this.getWarnType() + ")"; |
|
|
|
return "AlertData(id=" + this.getId() + ", title=" + this.getTitle() + ", content=" + this.getContent() + ", log=" + this.getLog() + ", warnType=" + this.getWarnType() + ")"; |
|
|
|
} |
|
|
|
} |
|
|
@ -181,6 +186,7 @@ public class AlertData { |
|
|
|
return new AlertData(id, title, content, log, warnType); |
|
|
|
return new AlertData(id, title, content, log, warnType); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|
return "AlertData.AlertDataBuilder(id=" + this.id + ", title=" + this.title + ", content=" + this.content + ", log=" + this.log + ", warnType=" + this.warnType + ")"; |
|
|
|
return "AlertData.AlertDataBuilder(id=" + this.id + ", title=" + this.title + ", content=" + this.content + ", log=" + this.log + ", warnType=" + this.warnType + ")"; |
|
|
|
} |
|
|
|
} |
|
|
|