2 <!-- ============LICENSE_START==========================================
3 ONAP Portal SDK ===================================================================
4 Copyright © 2017 AT&T Intellectual Property. All rights reserved. ===================================================================
5 Unless otherwise specified, all software contained herein is licensed under
6 the Apache License, Version 2.0 (the “License”); you may not use this software
7 except in compliance with the License. You may obtain a copy of the License
8 at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
9 law or agreed to in writing, software distributed under the License is distributed
10 on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11 express or implied. See the License for the specific language governing permissions
12 and limitations under the License. Unless otherwise specified, all documentation
13 contained herein is licensed under the Creative Commons License, Attribution
14 4.0 Intl. (the “License”); you may not use this documentation except in compliance
15 with the License. You may obtain a copy of the License at https://creativecommons.org/licenses/by/4.0/
16 Unless required by applicable law or agreed to in writing, documentation
17 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
19 License for the specific language governing permissions and limitations under
20 the License. ============LICENSE_END============================================ -->
22 <!DOCTYPE hibernate-mapping PUBLIC
23 "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
24 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
27 package="org.onap.portalsdk.analytics.model.base">
29 <class name="ReportUserRole" table="cr_report_access">
31 <key-property name="repId" column="rep_id" />
32 <key-property name="orderNo" column="order_no" />
35 <property name="roleId" column="role_id" />
36 <property name="userId" column="user_id" />
37 <property name="readOnlyYn" column="read_only_yn" />
40 <query name="getReportSecurityUsers">
41 select repId, orderNo, roleId, userId, readOnlyYn from ReportUserRole where
42 repId = :report_id and userId is not null
45 <query name="getReportSecurityRoles">
46 select repId, orderNo, roleId, userId, readOnlyYn from ReportUserRole where
47 repId = :report_id and roleId is not null
50 <query name="deleteReportSecurityUsers">
51 delete from ReportUserRole where repId = :report_id and userId =:user_id
54 <query name="deleteReportSecurityRoles">
55 delete from ReportUserRole where repId = :report_id and roleId =:role_id