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 0000000000000000000000000000000000000000..a4cbf48e871719f448edd35eb160269d785c87be --- /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 0000000000000000000000000000000000000000..5a007331068dabcc559c6a8afaee1e7dd56d9142 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -0,0 +1,184 @@ +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.BaseRootNamedEntity; +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 BaseRootNamedEntity { + + @JsonProperty("id") + private String id; + @JsonProperty("code") + private String code; + @JsonProperty("description") + private String description; + @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<>(); + + 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; + 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(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(super.hashCode(), id, code, description, 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 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 0000000000000000000000000000000000000000..ff05ba87a76b5c989a5cd9803ebc595eb502fe80 --- /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 0000000000000000000000000000000000000000..d031b83e2b9133f7b7148dc37db96fde6afccaf6 --- /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 0000000000000000000000000000000000000000..5a6380668eaa705eb4ded3f9667a53edca2acd3b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java @@ -0,0 +1,75 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; + +import java.util.Objects; + +@Entity(name="PlaceRefOrValue") +public class PlaceRefOrValue extends BaseRootNamedEntity { + @JsonProperty("id") + private String id; + + @JsonProperty("@referredType") + private String referredType; + + public PlaceRefOrValue() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + 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(referredType, that.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), id, 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 "); + } +}