1717package org .neo4j .driver .internal .summary ;
1818
1919import java .util .Map ;
20+ import java .util .Objects ;
2021import java .util .Optional ;
2122import org .neo4j .driver .NotificationClassification ;
2223import org .neo4j .driver .NotificationSeverity ;
@@ -31,6 +32,11 @@ public final class InternalGqlNotification extends InternalGqlStatusObject imple
3132 private final NotificationClassification classification ;
3233 private final String rawClassification ;
3334
35+ // private Neo4j use only
36+ private final String code ;
37+ private final String title ;
38+ private final String description ;
39+
3440 public InternalGqlNotification (
3541 String gqlStatus ,
3642 String statusDescription ,
@@ -39,13 +45,19 @@ public InternalGqlNotification(
3945 NotificationSeverity severityLevel ,
4046 String rawSeverityLevel ,
4147 NotificationClassification classification ,
42- String rawClassification ) {
48+ String rawClassification ,
49+ String code ,
50+ String title ,
51+ String description ) {
4352 super (gqlStatus , statusDescription , diagnosticRecord );
4453 this .position = position ;
4554 this .severityLevel = severityLevel ;
4655 this .rawSeverityLevel = rawSeverityLevel ;
4756 this .classification = classification ;
4857 this .rawClassification = rawClassification ;
58+ this .code = code ;
59+ this .title = title ;
60+ this .description = description ;
4961 }
5062
5163 @ Override
@@ -73,11 +85,47 @@ public Optional<String> rawClassification() {
7385 return Optional .ofNullable (rawClassification );
7486 }
7587
88+ @ Override
89+ public boolean equals (Object o ) {
90+ if (this == o ) return true ;
91+ if (o == null || getClass () != o .getClass ()) return false ;
92+ var that = (InternalGqlNotification ) o ;
93+ return Objects .equals (gqlStatus , that .gqlStatus )
94+ && Objects .equals (statusDescription , that .statusDescription )
95+ && Objects .equals (diagnosticRecord , that .diagnosticRecord )
96+ && Objects .equals (code , that .code )
97+ && Objects .equals (title , that .title )
98+ && Objects .equals (description , that .description );
99+ }
100+
101+ @ Override
102+ public int hashCode () {
103+ return Objects .hash (gqlStatus , statusDescription , diagnosticRecord , code , title , description );
104+ }
105+
76106 @ Override
77107 public String toString () {
78108 return "InternalGqlNotification{" + "gqlStatus='"
79109 + gqlStatus + '\'' + ", statusDescription='"
80110 + statusDescription + '\'' + ", diagnosticRecord="
81- + diagnosticRecord + '}' ;
111+ + diagnosticRecord + '\'' + ", code='"
112+ + code + '\'' + ", title='"
113+ + title + '\'' + ", description='"
114+ + description + '}' ;
115+ }
116+
117+ // private Neo4j use only
118+ public String code () {
119+ return code ;
120+ }
121+
122+ // private Neo4j use only
123+ public String title () {
124+ return title ;
125+ }
126+
127+ // private Neo4j use only
128+ public String description () {
129+ return description ;
82130 }
83131}
0 commit comments