diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-core/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/ItemPermissionsDaoImpl.java')
-rw-r--r-- | openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-core/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/ItemPermissionsDaoImpl.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-core/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/ItemPermissionsDaoImpl.java b/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-core/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/ItemPermissionsDaoImpl.java index e1a9d1c874..8c62aa02fe 100644 --- a/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-core/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/ItemPermissionsDaoImpl.java +++ b/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-core/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/ItemPermissionsDaoImpl.java @@ -38,7 +38,7 @@ public class ItemPermissionsDaoImpl implements ItemPermissionsDao { } @Override - public String getUserItemPermiission(String itemId, String userId) { + public String getUserItemPermission(String itemId, String userId) { ResultSet result = accessor.getUserItemPermission(itemId,userId); if (result.getAvailableWithoutFetching() < 1) { @@ -47,6 +47,11 @@ public class ItemPermissionsDaoImpl implements ItemPermissionsDao { return result.one().getString(0); } + @Override + public void deleteItemPermissions(String itemId) { + accessor.deleteItemPermissions(itemId); + } + @Accessor interface ItemPermissionsAccessor { @@ -62,5 +67,9 @@ public class ItemPermissionsDaoImpl implements ItemPermissionsDao { @Query("insert into dox.item_permissions (item_id,user_id,permission) values (?,?,?)") void addPermission(String itemId,String userId, String permission); + @Query("delete from dox.item_permissions where item_id=?") + void deleteItemPermissions(String itemId); + + } } |