X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ri%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fcps%2Fspi%2Fentities%2FAnchorEntity.java;h=b59150f2e4727f5a1abea9a77b3d6f9394013e43;hb=d701ea2c8a9d437846a3c08c103c8b68eaff7334;hp=b893428278b7fc3e60e630a5cb49a30e6e5d25bc;hpb=08a47195fb3882e396b2dd01b01afa5da42255fb;p=cps.git diff --git a/cps-ri/src/main/java/org/onap/cps/spi/entities/AnchorEntity.java b/cps-ri/src/main/java/org/onap/cps/spi/entities/AnchorEntity.java index b893428278..b59150f2e4 100644 --- a/cps-ri/src/main/java/org/onap/cps/spi/entities/AnchorEntity.java +++ b/cps-ri/src/main/java/org/onap/cps/spi/entities/AnchorEntity.java @@ -1,6 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2021 Pantheon.tech + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +33,7 @@ import javax.persistence.Table; import javax.validation.constraints.NotNull; import lombok.AllArgsConstructor; import lombok.Builder; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -46,6 +48,7 @@ import lombok.Setter; @Builder @Entity @Table(name = "anchor") +@EqualsAndHashCode(onlyExplicitlyIncluded = true) public class AnchorEntity implements Serializable { private static final long serialVersionUID = -8049987915308262518L; @@ -56,6 +59,7 @@ public class AnchorEntity implements Serializable { @NotNull @Column + @EqualsAndHashCode.Include private String name; @NotNull @@ -66,5 +70,6 @@ public class AnchorEntity implements Serializable { @NotNull @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "dataspace_id") + @EqualsAndHashCode.Include private DataspaceEntity dataspace; }