From d07187001c34a809ef99a179572237331056c96c Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Thu, 28 Mar 2024 16:49:38 +0200 Subject: [PATCH 1/4] tmf 674 model entities --- .../osl/tmf/gsm674/model/CalendarPeriod.java | 100 +++++++++++ .../osl/tmf/gsm674/model/GeographicSite.java | 161 ++++++++++++++++++ .../model/GeographicSiteRelationship.java | 96 +++++++++++ .../etsi/osl/tmf/gsm674/model/HourPeriod.java | 79 +++++++++ .../osl/tmf/gsm674/model/PlaceRefOrValue.java | 86 ++++++++++ 5 files changed, 522 insertions(+) create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java new file mode 100644 index 0000000..a4cbf48 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java @@ -0,0 +1,100 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; + +@Entity(name="CalendarPeriod") +public class CalendarPeriod extends BaseRootEntity { + @JsonProperty("day") + private String day; + @JsonProperty("status") + private String status; + @JsonProperty("timeZone") + private String timeZone; + + @JsonProperty("hourPeriod") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + Set hourPeriod = new HashSet<>(); + + public CalendarPeriod() { + } + + public String getDay() { + return day; + } + + public void setDay(String day) { + this.day = day; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getTimeZone() { + return timeZone; + } + + public void setTimeZone(String timeZone) { + this.timeZone = timeZone; + } + + public Set getHourPeriod() { + return hourPeriod; + } + + public void setHourPeriod(Set hourPeriod) { + this.hourPeriod = hourPeriod; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + CalendarPeriod that = (CalendarPeriod) o; + return Objects.equals(day, that.day) && Objects.equals(status, that.status) && Objects.equals(timeZone, that.timeZone) && Objects.equals(hourPeriod, that.hourPeriod); + } + + @Override + public int hashCode() { + return Objects.hash(day, status, timeZone, hourPeriod); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CalendarPeriod {\n"); + sb.append(" day: ").append(toIndentedString(day)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" hourPeriod: ").append(toIndentedString(hourPeriod)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java new file mode 100644 index 0000000..b3ec7a1 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -0,0 +1,161 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.prm669.model.RelatedParty; + +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; + +@Entity(name = "GeographicSite") +public class GeographicSite extends BaseRootEntity { + + @JsonProperty("id") + private String id; + @JsonProperty("code") + private String code; + @JsonProperty("description") + private String description; + @JsonProperty("name") + private String name; + @JsonProperty("status") + private String status; + + @JsonProperty("calendar") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set calendar = new HashSet<>(); + + @JsonProperty("place") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set placeRefOrValue = new HashSet<>(); + + @JsonProperty("siteRelationship") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set geographicSiteRelationship = new HashSet<>(); + + @JsonProperty("relatedParty") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set relatedParties = new HashSet<>(); + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + GeographicSite that = (GeographicSite) o; + return Objects.equals(id, that.id) && Objects.equals(code, that.code) && Objects.equals(description, that.description) && Objects.equals(name, that.name) && Objects.equals(status, that.status) && Objects.equals(calendar, that.calendar) && Objects.equals(placeRefOrValue, that.placeRefOrValue) && Objects.equals(geographicSiteRelationship, that.geographicSiteRelationship) && Objects.equals(relatedParties, that.relatedParties); + } + + @Override + public int hashCode() { + return Objects.hash(id, code, description, name, status, calendar, placeRefOrValue, geographicSiteRelationship, relatedParties); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Set getCalendar() { + return calendar; + } + + public void setCalendar(Set calendar) { + this.calendar = calendar; + } + + public Set getPlaceRefOrValue() { + return placeRefOrValue; + } + + public void setPlaceRefOrValue(Set placeRefOrValue) { + this.placeRefOrValue = placeRefOrValue; + } + + public Set getGeographicSiteRelationship() { + return geographicSiteRelationship; + } + + public void setGeographicSiteRelationship(Set geographicSiteRelationship) { + this.geographicSiteRelationship = geographicSiteRelationship; + } + + public Set getRelatedParties() { + return relatedParties; + } + + public void setRelatedParties(Set relatedParties) { + this.relatedParties = relatedParties; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSite {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" calendar: ").append(toIndentedString(calendar)).append("\n"); + sb.append(" place: ").append(toIndentedString(placeRefOrValue)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParties)).append("\n"); + sb.append(" siteRelationship: ").append(toIndentedString(geographicSiteRelationship)).append("\n"); + sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java new file mode 100644 index 0000000..ff05ba8 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java @@ -0,0 +1,96 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import java.util.Objects; + +@Entity(name="GeographicSiteRelationship") +public class GeographicSiteRelationship extends BaseRootEntity { + @JsonProperty("relationshipType") + private String relationshipType; + @JsonProperty("role") + private String role; + @JsonProperty("id") + private String id; + + @JsonProperty("validFor") + private TimePeriod validFor; + + public GeographicSiteRelationship() { + } + + public String getRelationshipType() { + return relationshipType; + } + + public void setRelationshipType(String relationshipType) { + this.relationshipType = relationshipType; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public TimePeriod getValidFor() { + return validFor; + } + + public void setValidFor(TimePeriod validFor) { + this.validFor = validFor; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + GeographicSiteRelationship that = (GeographicSiteRelationship) o; + return Objects.equals(relationshipType, that.relationshipType) && Objects.equals(role, that.role) && Objects.equals(id, that.id) && Objects.equals(validFor, that.validFor); + } + + @Override + public int hashCode() { + return Objects.hash(relationshipType, role, id, validFor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSiteRelationship {\n"); + sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java new file mode 100644 index 0000000..d031b83 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java @@ -0,0 +1,79 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + +import java.util.Objects; + +@Entity(name="HourPeriod") +public class HourPeriod extends BaseRootEntity { + + @JsonProperty("endHour") + private String endHour; + @JsonProperty("startHour") + private String startHour; + + public HourPeriod() { + } + + public HourPeriod(String endHour, String startHour) { + this.endHour = endHour; + this.startHour = startHour; + } + + public String getEndHour() { + return endHour; + } + + public void setEndHour(String endHour) { + this.endHour = endHour; + } + + public String getStartHour() { + return startHour; + } + + public void setStartHour(String startHour) { + this.startHour = startHour; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + HourPeriod that = (HourPeriod) o; + return Objects.equals(endHour, that.endHour) && Objects.equals(startHour, that.startHour); + } + + @Override + public int hashCode() { + return Objects.hash(endHour, startHour); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HourPeriod {\n"); + sb.append(" startHour: ").append(toIndentedString(startHour)).append("\n"); + sb.append(" endHour: ").append(toIndentedString(endHour)).append("\n"); + sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java new file mode 100644 index 0000000..11a99b3 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java @@ -0,0 +1,86 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + +import java.util.Objects; + +@Entity(name="PlaceRefOrValue") +public class PlaceRefOrValue extends BaseRootEntity { + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public PlaceRefOrValue() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + PlaceRefOrValue that = (PlaceRefOrValue) o; + return Objects.equals(id, that.id) && Objects.equals(name, that.name) && Objects.equals(referredType, that.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlaceRefOrValue {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" @referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} -- GitLab From 68c2867c74ef4cf58ad9595d0aa8775828c1964e Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Thu, 4 Apr 2024 10:43:18 +0300 Subject: [PATCH 2/4] add methods in the model --- .../osl/tmf/gsm674/model/GeographicSite.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java index b3ec7a1..6d100c4 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -41,6 +41,39 @@ public class GeographicSite extends BaseRootEntity { @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) private Set relatedParties = new HashSet<>(); + public GeographicSite addCalendarPeriod(CalendarPeriod calendarPeriod){ + if(this.calendar==null){ + this.calendar=new HashSet<>(); + } + this.calendar.add(calendarPeriod); + return this; + } + + public GeographicSite addPlaceRefOrValue(PlaceRefOrValue placeRefOrValue){ + if(this.placeRefOrValue==null){ + this.placeRefOrValue=new HashSet<>(); + } + this.placeRefOrValue.add(placeRefOrValue); + return this; + } + + public GeographicSite addGeographicSiteRelationship(GeographicSiteRelationship geographicSiteRelationship){ + if (this.geographicSiteRelationship==null){ + this.geographicSiteRelationship=new HashSet<>(); + + } + this.geographicSiteRelationship.add(geographicSiteRelationship); + return this; + } + + public GeographicSite addRelatedParty(RelatedParty relatedParty){ + if(this.relatedParties==null){ + this.relatedParties=new HashSet<>(); + } + this.relatedParties.add(relatedParty); + return this; + } + @Override public boolean equals(Object o) { if (this == o) return true; -- GitLab From 00963c1502745150427f5fa2088f98a68477b20f Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 9 Apr 2024 16:53:52 +0300 Subject: [PATCH 3/4] refactor to use BaseRootNamed entity instead --- .../etsi/osl/tmf/gsm674/model/GeographicSite.java | 14 ++------------ .../etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java | 14 +++----------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java index 6d100c4..db14ec4 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.OneToMany; -import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.etsi.osl.tmf.prm669.model.RelatedParty; import java.util.HashSet; @@ -12,7 +12,7 @@ import java.util.Objects; import java.util.Set; @Entity(name = "GeographicSite") -public class GeographicSite extends BaseRootEntity { +public class GeographicSite extends BaseRootNamedEntity { @JsonProperty("id") private String id; @@ -20,8 +20,6 @@ public class GeographicSite extends BaseRootEntity { private String code; @JsonProperty("description") private String description; - @JsonProperty("name") - private String name; @JsonProperty("status") private String status; @@ -112,14 +110,6 @@ public class GeographicSite extends BaseRootEntity { this.description = description; } - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - public String getStatus() { return status; } diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java index 11a99b3..759e2b8 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java @@ -2,12 +2,12 @@ package org.etsi.osl.tmf.gsm674.model; import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.persistence.Entity; -import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import java.util.Objects; @Entity(name="PlaceRefOrValue") -public class PlaceRefOrValue extends BaseRootEntity { +public class PlaceRefOrValue extends BaseRootNamedEntity { @JsonProperty("id") private String id; @@ -28,14 +28,6 @@ public class PlaceRefOrValue extends BaseRootEntity { this.id = id; } - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - public String getReferredType() { return referredType; } @@ -55,7 +47,7 @@ public class PlaceRefOrValue extends BaseRootEntity { @Override public int hashCode() { - return Objects.hash(id, name, referredType); + return Objects.hash(super.hashCode(), id, name, referredType); } @Override -- GitLab From b69a81c59dae4ac998d0157831918e53812ba3dc Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Wed, 10 Apr 2024 13:27:59 +0300 Subject: [PATCH 4/4] refactor code --- .../java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java | 4 ++-- .../org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java index db14ec4..5a00733 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -78,12 +78,12 @@ public class GeographicSite extends BaseRootNamedEntity { if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; GeographicSite that = (GeographicSite) o; - return Objects.equals(id, that.id) && Objects.equals(code, that.code) && Objects.equals(description, that.description) && Objects.equals(name, that.name) && Objects.equals(status, that.status) && Objects.equals(calendar, that.calendar) && Objects.equals(placeRefOrValue, that.placeRefOrValue) && Objects.equals(geographicSiteRelationship, that.geographicSiteRelationship) && Objects.equals(relatedParties, that.relatedParties); + return Objects.equals(id, that.id) && Objects.equals(code, that.code) && Objects.equals(description, that.description) && Objects.equals(status, that.status) && Objects.equals(calendar, that.calendar) && Objects.equals(placeRefOrValue, that.placeRefOrValue) && Objects.equals(geographicSiteRelationship, that.geographicSiteRelationship) && Objects.equals(relatedParties, that.relatedParties); } @Override public int hashCode() { - return Objects.hash(id, code, description, name, status, calendar, placeRefOrValue, geographicSiteRelationship, relatedParties); + return Objects.hash(super.hashCode(), id, code, description, status, calendar, placeRefOrValue, geographicSiteRelationship, relatedParties); } public String getId() { diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java index 759e2b8..5a63806 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java @@ -11,9 +11,6 @@ public class PlaceRefOrValue extends BaseRootNamedEntity { @JsonProperty("id") private String id; - @JsonProperty("name") - private String name; - @JsonProperty("@referredType") private String referredType; @@ -42,12 +39,12 @@ public class PlaceRefOrValue extends BaseRootNamedEntity { if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; PlaceRefOrValue that = (PlaceRefOrValue) o; - return Objects.equals(id, that.id) && Objects.equals(name, that.name) && Objects.equals(referredType, that.referredType); + return Objects.equals(id, that.id) && Objects.equals(referredType, that.referredType); } @Override public int hashCode() { - return Objects.hash(super.hashCode(), id, name, referredType); + return Objects.hash(super.hashCode(), id, referredType); } @Override -- GitLab