Code Review
/
portal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
WidgetsController test coverage up
[portal.git]
/
portal-BE
/
src
/
main
/
java
/
org
/
onap
/
portal
/
domain
/
db
/
fn
/
FnUserRole.java
diff --git
a/portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnUserRole.java
b/portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnUserRole.java
index
390ef8b
..
4e78376
100644
(file)
--- a/
portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnUserRole.java
+++ b/
portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnUserRole.java
@@
-53,6
+53,8
@@
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;
import javax.persistence.ManyToOne;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
@@
-82,16
+84,25
@@
CREATE TABLE `fn_user_role` (
@NamedNativeQueries({
@NamedNativeQuery(
name = "FnUserRole.retrieveUserRoleOnUserIdAndRoleIdAndAppId",
@NamedNativeQueries({
@NamedNativeQuery(
name = "FnUserRole.retrieveUserRoleOnUserIdAndRoleIdAndAppId",
- query = "
select * from
FnUserRole where user_id= :userId"
+ query = "
FROM
FnUserRole where user_id= :userId"
+ " and role_id= :roleId"
+ " and app_id= :appId"),
@NamedNativeQuery(
name = "FnUserRole.retrieveCachedAppRolesForUser",
+ " and role_id= :roleId"
+ " and app_id= :appId"),
@NamedNativeQuery(
name = "FnUserRole.retrieveCachedAppRolesForUser",
- query = "
select * from
FnUserRole where user_id= :userId"
+ query = "
FROM
FnUserRole where user_id= :userId"
+ " and user_id= :userId"
+ " and app_id= :appId")
})
+ " and user_id= :userId"
+ " and app_id= :appId")
})
+@NamedQueries({
+ @NamedQuery(
+ name = "FnUserRole.getAdminUserRoles",
+ query = "FROM FnUserRole fn "
+ + "WHERE fn.userId.userId = :USERID "
+ + "AND fn.roleId.roleId = :ROLEID "
+ + "AND fn.appId.appId = :APPID")
+})
+
@Table(
name = "fn_user_role",
indexes = {
@Table(
name = "fn_user_role",
indexes = {