diff options
Diffstat (limited to 'ecomp-portal-widget-ms/widget-ms')
-rw-r--r-- | ecomp-portal-widget-ms/widget-ms/pom.xml | 5 | ||||
-rw-r--r-- | ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/RoleApp.java | 18 |
2 files changed, 20 insertions, 3 deletions
diff --git a/ecomp-portal-widget-ms/widget-ms/pom.xml b/ecomp-portal-widget-ms/widget-ms/pom.xml index 7c5a40e6..91dc4fd6 100644 --- a/ecomp-portal-widget-ms/widget-ms/pom.xml +++ b/ecomp-portal-widget-ms/widget-ms/pom.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <!-- This project must name Spring as parent; cannot name Portal --> @@ -7,7 +8,7 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.2.RELEASE</version> - <relativePath/> <!-- lookup parent from repository --> + <relativePath /> <!-- lookup parent from repository --> </parent> <groupId>org.onap.portal</groupId> diff --git a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/RoleApp.java b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/RoleApp.java index 7ae3c270..807067b2 100644 --- a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/RoleApp.java +++ b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/RoleApp.java @@ -37,8 +37,24 @@ public class RoleApp implements Serializable{ @JsonIgnore @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}, mappedBy="widgetRoles") - private transient Set<WidgetCatalog> widgets; + private Set<WidgetCatalog> widgets; + /*@PreRemove + private void removeGroupsFromUsers() { + for (WidgetCatalog w : widgets) { + w.getWidgetRoles().remove(this); + } + }*/ + + /*@ManyToOne + @JoinColumn(name = "WIDGET_ID", nullable = false) + WidgetCatalog widgetCatalog;*/ + + //@JsonIgnore + //@ManyToMany(mappedBy = "widgetRoles") + //@ManyToMany(fetch = FetchType.EAGER, mappedBy = "widgetRoles") + //private Set<WidgetCatalog> widgets = new HashSet<WidgetCatalog>(); + public Long getRoleId() { return roleId; } |