mirror of
https://github.com/sismics/docs.git
synced 2024-11-16 03:07:57 +01:00
search acl without type
This commit is contained in:
parent
716954aa9a
commit
c9ba182a2e
@ -73,12 +73,17 @@ public class AclDao {
|
|||||||
.append(" left join T_USER u on u.USE_ID_C = a.ACL_TARGETID_C ")
|
.append(" left join T_USER u on u.USE_ID_C = a.ACL_TARGETID_C ")
|
||||||
.append(" left join T_SHARE s on s.SHA_ID_C = a.ACL_TARGETID_C ")
|
.append(" left join T_SHARE s on s.SHA_ID_C = a.ACL_TARGETID_C ")
|
||||||
.append(" left join T_GROUP g on g.GRP_ID_C = a.ACL_TARGETID_C ")
|
.append(" left join T_GROUP g on g.GRP_ID_C = a.ACL_TARGETID_C ")
|
||||||
.append(" where a.ACL_DELETEDATE_D is null and a.ACL_SOURCEID_C = :sourceId and a.ACL_TYPE_C = :type ");
|
.append(" where a.ACL_DELETEDATE_D is null and a.ACL_SOURCEID_C = :sourceId ");
|
||||||
|
if (type != null) {
|
||||||
|
sb.append(" and a.ACL_TYPE_C = :type");
|
||||||
|
}
|
||||||
|
|
||||||
// Perform the query
|
// Perform the query
|
||||||
Query q = em.createNativeQuery(sb.toString());
|
Query q = em.createNativeQuery(sb.toString());
|
||||||
q.setParameter("sourceId", sourceId);
|
q.setParameter("sourceId", sourceId);
|
||||||
|
if (type != null) {
|
||||||
q.setParameter("type", type.name());
|
q.setParameter("type", type.name());
|
||||||
|
}
|
||||||
List<Object[]> l = q.getResultList();
|
List<Object[]> l = q.getResultList();
|
||||||
|
|
||||||
// Assemble results
|
// Assemble results
|
||||||
|
Loading…
Reference in New Issue
Block a user