@Override
  public List<Permission> findPermissionsNotInRole(Role role) {
    if (role == null) {
      return new ArrayList<Permission>();
    }

    Role r = findRoleById(role.getId());
    if (r == null || r.getPermissionSet().isEmpty()) {
      return new ArrayList<Permission>();
    }

    List<String> ids = new ArrayList<String>();
    for (Permission p : r.getPermissionSet()) {
      ids.add(p.getId());
    }

    return permissionDao.findByIdNotIn(ids);
  }
  @Override
  public Role findRoleById(String id) {
    if (!StringUtils.hasText(id)) {
      return null;
    }

    Role r = roleDao.findOne(id);
    if (r != null) {
      r.getPermissionSet().size();
      r.getMenuSet().size();
    }

    return r;
  }