@Override public void delete(Integer id) { if (null == id) { throw new IllegalArgumentException("Null id"); } rolePermissionDao.delete(id); }
@Override public List<RolePermission> findByRole(Integer roleId) { if (null == roleId) { throw new IllegalArgumentException("Null roleId"); } return rolePermissionDao.findByRole(roleId); }
@Override public void add(Integer permissionId, Integer roleId) { if (null == permissionId || null == roleId) { throw new IllegalArgumentException(); } RolePermission rolePermission = new RolePermission(roleId, permissionId); rolePermissionDao.save(rolePermission); }