Exemplo n.º 1
0
  @Override
  public Iterable<T> findAll() {
    QueryModel queryModel = new QueryModel();

    if (accessControlContextProvider != null) {
      queryModel.setAccessControlContext(accessControlContextProvider.getCurrent());
    }

    return findUsingQueryModel(queryModel);
  }
Exemplo n.º 2
0
  @Override
  public T findById(ID id) throws NoSuchItemException {
    QueryModel queryModel = new QueryModel();
    queryModel.addCondition(buildIdCondition(id));

    if (accessControlContextProvider != null) {
      queryModel.setAccessControlContext(accessControlContextProvider.getCurrent());
    }

    return findUniqueUsingQueryModel(queryModel);
  }