Skip to content

Commit aa72dd7

Browse files
authored
Merge pull request #10352 from neo-technology/🍰_graph_store_stream
🍰 graph store stream
2 parents 986443a + be9f80b commit aa72dd7

File tree

5 files changed

+29
-92
lines changed

5 files changed

+29
-92
lines changed

applications/graph-store-catalog-results/src/main/java/org/neo4j/gds/applications/graphstorecatalog/GraphStreamNodePropertiesResult.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,10 @@
2121

2222
import java.util.List;
2323

24-
public class GraphStreamNodePropertiesResult {
25-
public final long nodeId;
26-
public final String nodeProperty;
27-
public final Object propertyValue;
28-
public final List<String> nodeLabels;
29-
30-
public GraphStreamNodePropertiesResult(long nodeId, String nodeProperty, Object propertyValue, List<String> nodeLabels) {
31-
this.nodeId = nodeId;
32-
this.nodeProperty = nodeProperty;
33-
this.propertyValue = propertyValue;
34-
this.nodeLabels = nodeLabels;
35-
}
24+
public record GraphStreamNodePropertiesResult(
25+
long nodeId,
26+
String nodeProperty,
27+
Object propertyValue,
28+
List<String> nodeLabels
29+
) {
3630
}

applications/graph-store-catalog-results/src/main/java/org/neo4j/gds/applications/graphstorecatalog/GraphStreamNodePropertyResult.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,9 @@
2121

2222
import java.util.List;
2323

24-
public class GraphStreamNodePropertyResult {
25-
public final long nodeId;
26-
public final Object propertyValue;
27-
public final List<String> nodeLabels;
28-
29-
public GraphStreamNodePropertyResult(long nodeId, Object propertyValue, List<String> nodeLabels) {
30-
this.nodeId = nodeId;
31-
this.propertyValue = propertyValue;
32-
this.nodeLabels = nodeLabels;
33-
}
24+
public record GraphStreamNodePropertyResult(
25+
long nodeId,
26+
Object propertyValue,
27+
List<String> nodeLabels
28+
){
3429
}

applications/graph-store-catalog-results/src/main/java/org/neo4j/gds/applications/graphstorecatalog/GraphStreamRelationshipPropertiesResult.java

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,11 @@
1919
*/
2020
package org.neo4j.gds.applications.graphstorecatalog;
2121

22-
public class GraphStreamRelationshipPropertiesResult {
23-
public final long sourceNodeId;
24-
public final long targetNodeId;
25-
public final String relationshipType;
26-
public final String relationshipProperty;
27-
public final Number propertyValue;
28-
29-
public GraphStreamRelationshipPropertiesResult(
30-
long sourceNodeId,
31-
long targetNodeId,
32-
String relationshipType,
33-
String relationshipProperty,
34-
Number propertyValue
35-
) {
36-
this.sourceNodeId = sourceNodeId;
37-
this.targetNodeId = targetNodeId;
38-
this.relationshipType = relationshipType;
39-
this.relationshipProperty = relationshipProperty;
40-
this.propertyValue = propertyValue;
41-
}
22+
public record GraphStreamRelationshipPropertiesResult(
23+
long sourceNodeId,
24+
long targetNodeId,
25+
String relationshipType,
26+
String relationshipProperty,
27+
Number propertyValue
28+
) {
4229
}

applications/graph-store-catalog-results/src/main/java/org/neo4j/gds/applications/graphstorecatalog/GraphStreamRelationshipPropertyResult.java

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,10 @@
1919
*/
2020
package org.neo4j.gds.applications.graphstorecatalog;
2121

22-
public class GraphStreamRelationshipPropertyResult {
23-
public final long sourceNodeId;
24-
public final long targetNodeId;
25-
public final String relationshipType;
26-
public final Number propertyValue;
27-
28-
public GraphStreamRelationshipPropertyResult(
29-
long sourceNodeId,
30-
long targetNodeId,
31-
String relationshipType,
32-
Number propertyValue
33-
) {
34-
this.sourceNodeId = sourceNodeId;
35-
this.targetNodeId = targetNodeId;
36-
this.relationshipType = relationshipType;
37-
this.propertyValue = propertyValue;
38-
}
22+
public record GraphStreamRelationshipPropertyResult(
23+
long sourceNodeId,
24+
long targetNodeId,
25+
String relationshipType,
26+
Number propertyValue
27+
) {
3928
}

applications/graph-store-catalog-results/src/main/java/org/neo4j/gds/applications/graphstorecatalog/TopologyResult.java

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,9 @@
1919
*/
2020
package org.neo4j.gds.applications.graphstorecatalog;
2121

22-
import java.util.Objects;
23-
24-
import static org.neo4j.gds.utils.StringFormatting.formatWithLocale;
25-
26-
public class TopologyResult {
27-
public final long sourceNodeId;
28-
public final long targetNodeId;
29-
public final String relationshipType;
30-
31-
public TopologyResult(long sourceNodeId, long targetNodeId, String relationshipType) {
32-
this.sourceNodeId = sourceNodeId;
33-
this.targetNodeId = targetNodeId;
34-
this.relationshipType = relationshipType;
35-
}
36-
37-
@Override
38-
public String toString() {
39-
return formatWithLocale("TopologyResult(%d, %d, type: %s)", sourceNodeId, targetNodeId, relationshipType);
40-
}
41-
42-
@Override
43-
public boolean equals(Object o) {
44-
if (this == o) return true;
45-
if (o == null || getClass() != o.getClass()) return false;
46-
TopologyResult that = (TopologyResult) o;
47-
return sourceNodeId == that.sourceNodeId && targetNodeId == that.targetNodeId && relationshipType.equals(
48-
that.relationshipType);
49-
}
50-
51-
@Override
52-
public int hashCode() {
53-
return Objects.hash(sourceNodeId, targetNodeId, relationshipType);
54-
}
22+
public record TopologyResult(
23+
long sourceNodeId,
24+
long targetNodeId,
25+
String relationshipType
26+
) {
5527
}

0 commit comments

Comments
 (0)