コード例 #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);
  }