getAppRolesForUser() method up in UserRolesController
[portal.git] / portal-BE / src / main / java / org / onap / portal / domain / db / fn / FnMenuFunctionalRoles.java
index 3e9ae0e..ff7cadc 100644 (file)
@@ -51,6 +51,8 @@ import javax.persistence.Id;
 import javax.persistence.Index;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
 import javax.persistence.Table;
 import javax.validation.Valid;
 import javax.validation.constraints.Digits;
@@ -76,6 +78,17 @@ CREATE TABLE `fn_menu_functional_roles` (
         )
 */
 
+@NamedQueries({
+    @NamedQuery(
+        name = "FnMenuFunctionalRoles.retrieveByRoleId",
+        query = "from FnMenuFunctionalRoles where roleId.roleId =:roleId"),
+    @NamedQuery(
+        name = "FnMenuFunctionalRoles.retrieveByMenuId",
+        query = "from FnMenuFunctionalRoles where menuId.menuId =:menuId"
+    )
+}
+)
+
 @Table(name = "fn_menu_functional_roles", indexes = {
         @Index(columnList = "menu_id", name = "fk_fn_menu_func_roles_menu_id_idx"),
         @Index(columnList = "app_id", name = "fk_fn_menu_func_roles_app_id_idx"),