예제 #1
0
  @Override
  public Iterable<T> findAll() {
    QueryModel queryModel = new QueryModel();

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

    return findUsingQueryModel(queryModel);
  }
예제 #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);
  }