예제 #1
0
  @Override
  public void delete(Integer id) {
    if (null == id) {
      throw new IllegalArgumentException("Null id");
    }

    rolePermissionDao.delete(id);
  }
예제 #2
0
  @Override
  public List<RolePermission> findByRole(Integer roleId) {
    if (null == roleId) {
      throw new IllegalArgumentException("Null roleId");
    }

    return rolePermissionDao.findByRole(roleId);
  }
예제 #3
0
  @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);
  }