From 68c2867c74ef4cf58ad9595d0aa8775828c1964e Mon Sep 17 00:00:00 2001
From: lpapadopoulos <lpapadopoulos@ubitech.eu>
Date: Thu, 4 Apr 2024 10:43:18 +0300
Subject: [PATCH] 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<RelatedParty> 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