2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * ===================================================================
7 * Modifications Copyright (c) 2019 Samsung
8 * ===================================================================
10 * Unless otherwise specified, all software contained herein is licensed
11 * under the Apache License, Version 2.0 (the "License");
12 * you may not use this software except in compliance with the License.
13 * You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
23 * Unless otherwise specified, all documentation contained herein is licensed
24 * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
25 * you may not use this documentation except in compliance with the License.
26 * You may obtain a copy of the License at
28 * https://creativecommons.org/licenses/by/4.0/
30 * Unless required by applicable law or agreed to in writing, documentation
31 * distributed under the License is distributed on an "AS IS" BASIS,
32 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33 * See the License for the specific language governing permissions and
34 * limitations under the License.
36 * ============LICENSE_END============================================
41 package org.onap.portal.domain.dto.transport;
43 import java.io.Serializable;
44 import javax.persistence.ColumnResult;
45 import javax.persistence.ConstructorResult;
46 import javax.persistence.NamedNativeQuery;
47 import javax.persistence.SqlResultSetMapping;
48 import lombok.AllArgsConstructor;
49 import lombok.Builder;
51 import lombok.NoArgsConstructor;
53 import lombok.ToString;
56 name = "GlobalRoleWithApplicationRoleFunction.getGlobalRoleForRequestedApp",
57 query = "select distinct "
58 + " d.role_id as roleId, "
59 + " d.role_name as roleName, "
60 + " d.active_yn as active, "
61 + " d.priority as priority, "
62 + " c.function_cd as functionCd, "
63 + " e.function_name as functionName, "
64 + " c.app_id as appId, "
65 + " c.role_app_id as roleAppId"
66 + "from fn_user_role a, fn_app b, ep_app_role_function c, fn_role d, ep_app_function e"
67 + " where b.app_id = c.app_id"
68 + " and a.app_id = c.role_app_id"
69 + " and b.enabled = 'Y' "
70 + " and c.role_id = d.role_id"
71 + " and d.active_yn='Y'"
72 + " and e.function_cd = c.function_cd"
73 + " and c.app_id=:requestedAppId "
74 + " and c.role_id =:roleId "
75 + " and e.app_id = c.app_id",
76 resultSetMapping = "GlobalRoleWithApplicationRoleFunction"
80 name = "GlobalRoleWithApplicationRoleFunction",
81 classes = @ConstructorResult(
82 targetClass = GlobalRoleWithApplicationRoleFunction.class,
84 @ColumnResult(name = "roleId"),
85 @ColumnResult(name = "roleName"),
86 @ColumnResult(name = "active"),
87 @ColumnResult(name = "priority"),
88 @ColumnResult(name = "functionCd"),
89 @ColumnResult(name = "functionName"),
90 @ColumnResult(name = "appId"),
91 @ColumnResult(name = "roleAppId")
103 public class GlobalRoleWithApplicationRoleFunction implements Serializable {
105 private static final long serialVersionUID = 1L;
108 private String roleName;
109 private Boolean active;
110 private Integer priority;
111 private String functionCd;
112 private String functionName;
114 private Long roleAppId;