Implementation of jpa saving for traffic traces.
This commit is contained in:
@@ -7,6 +7,7 @@ public record TrafficTrace(
|
||||
UUID id,
|
||||
ZonedDateTime dateTime,
|
||||
TrafficEndpoint endpoint,
|
||||
UUID userId,
|
||||
String correlationId
|
||||
) {
|
||||
public static Builder aTrafficTrace() {
|
||||
@@ -17,6 +18,7 @@ public record TrafficTrace(
|
||||
private UUID id;
|
||||
private ZonedDateTime dateTime;
|
||||
private TrafficEndpoint endpoint;
|
||||
private UUID userId;
|
||||
private String correlationId;
|
||||
|
||||
private Builder() {}
|
||||
@@ -36,13 +38,18 @@ public record TrafficTrace(
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder withUserId(UUID userId) {
|
||||
this.userId = userId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder withCorrelationId(String correlationId) {
|
||||
this.correlationId = correlationId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public TrafficTrace build() {
|
||||
return new TrafficTrace(id, dateTime, endpoint, correlationId);
|
||||
return new TrafficTrace(id, dateTime, endpoint, userId, correlationId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user