summaryrefslogtreecommitdiffstats
path: root/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpAppRoleFunction.java
diff options
context:
space:
mode:
Diffstat (limited to 'portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpAppRoleFunction.java')
-rw-r--r--portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpAppRoleFunction.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpAppRoleFunction.java b/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpAppRoleFunction.java
index 3cb219a3..117167aa 100644
--- a/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpAppRoleFunction.java
+++ b/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpAppRoleFunction.java
@@ -53,6 +53,8 @@ import javax.persistence.Index;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
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;
@@ -83,6 +85,13 @@ CREATE TABLE `ep_app_role_function` (
)
*/
+@NamedQueries({
+ @NamedQuery(
+ name = "EpAppRoleFunction.getAppRoleFunctionOnRoleIdAndAppId",
+ query = "from EpAppRoleFunction where appId.id = :appId and fnRole.id = :roleId"
+ )
+})
+
@Table(name = "ep_app_role_function", indexes = {
@Index(name = "fk_ep_app_role_function_ep_app_func_role_id", columnList = "app_id, role_id, function_cd", unique = true),
@Index(name = "fk_ep_app_role_function_ep_app_func", columnList = "app_id, function_cd"),