X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=portal-BE%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportal%2Fdomain%2Fdb%2Ffn%2FFnMenuFunctional.java;h=e1e2787c9fcd0e852fc0fc74a0ff4aa0789519b9;hb=39fb119cdaea6bd8d801b22d195db39f6d8faaca;hp=bfdc673d4495ff3bc70ba829cb81039ca0a881ae;hpb=3e7c806aad258b265578f4652799c1a32084e853;p=portal.git diff --git a/portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnMenuFunctional.java b/portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnMenuFunctional.java index bfdc673d..e1e2787c 100644 --- a/portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnMenuFunctional.java +++ b/portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnMenuFunctional.java @@ -40,8 +40,8 @@ package org.onap.portal.domain.db.fn; -import java.util.ArrayList; -import java.util.List; +import java.io.Serializable; +import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; @@ -54,6 +54,8 @@ import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.validation.Valid; @@ -83,6 +85,14 @@ CREATE TABLE `fn_menu_functional` ( ) */ +@NamedQueries({ + @NamedQuery( + name = "FnMenuFunctional.retrieveByMenuId", + query = "from FnMenuFunctionalRoles where menuId =:menuId" + ) +} +) + @Table(name = "fn_menu_functional", indexes = {@Index(columnList = "parent_menu_id", name = "fk_fn_menu_func_parent_menu_id_idx") }) @NoArgsConstructor @@ -90,7 +100,7 @@ CREATE TABLE `fn_menu_functional` ( @Getter @Setter @Entity -public class FnMenuFunctional { +public class FnMenuFunctional implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "menu_id", nullable = false, length = 11) @@ -134,26 +144,26 @@ public class FnMenuFunctional { @Index(name = "sys_c0014619", columnList = "menu_id") } ) - private List fnUsers = new ArrayList<>(); + private Set fnUsers; @OneToMany( targetEntity = FnMenuFunctionalAncestors.class, mappedBy = "menuId", cascade = CascadeType.ALL, fetch = FetchType.LAZY ) - private List fnMenuFunctionalAncestorsMenuId = new ArrayList<>(); + private Set fnMenuFunctionalAncestorsMenuId; @OneToMany( targetEntity = FnMenuFunctionalAncestors.class, mappedBy = "ancestorMenuId", cascade = CascadeType.ALL, fetch = FetchType.LAZY ) - private List fnMenuFunctionalsAncestorMenuId = new ArrayList<>(); + private Set fnMenuFunctionalsAncestorMenuId; @OneToMany( targetEntity = FnMenuFunctionalRoles.class, mappedBy = "menuId", cascade = CascadeType.ALL, fetch = FetchType.LAZY ) - private List fnMenuFunctionalRoles = new ArrayList<>(); + private Set fnMenuFunctionalRoles; }