We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a99f64 commit f78f439Copy full SHA for f78f439
1 file changed
src/main/java/com/acme/statistics/PaymentCounter.java
@@ -7,12 +7,14 @@
7
import jakarta.nosql.Entity;
8
import jakarta.nosql.Id;
9
10
+import java.util.UUID;
11
+
12
@Entity
13
@JsonbVisibility(JsonFieldStrategy.class)
14
public class PaymentCounter {
15
16
@Id
- private String productCode;
17
+ private UUID productCode;
18
19
@Column
20
private Product product;
@@ -38,4 +40,13 @@ public void paymentFailed() {
38
40
public void paymentSucceeded() {
39
41
this.successfulPayments++;
42
}
43
44
+ @Override
45
+ public String toString() {
46
+ return "PaymentCounter{" +
47
+ "productCode=" + productCode +
48
+ ", successfulPayments=" + successfulPayments +
49
+ ", failedPayments=" + failedPayments +
50
+ '}';
51
+ }
52
0 commit comments