/**
   * Gets the statements.
   *
   * @param httpServletRequest the http servlet request
   * @param query the query
   * @param resolvedFilter the filter
   * @param page the page
   * @return the statements
   */
  @RequestMapping(value = PATH_STATEMENTS, method = RequestMethod.POST)
  public Object getStatements(
      HttpServletRequest httpServletRequest,
      RestReadContext restReadContext,
      QueryControl queryControl,
      @RequestBody Query query,
      RestFilter restFilter,
      Page page,
      boolean list) {

    ResourceQueryBuilder builder = this.getNewResourceQueryBuilder();

    ResourceQuery resourceQuery =
        builder
            .addQuery(query)
            .addRestFilter(restFilter)
            .addRestReadContext(restReadContext)
            .build();

    return this.doQuery(
        httpServletRequest,
        list,
        this.statementQueryService,
        resourceQuery,
        page,
        queryControl,
        StatementDirectory.class,
        StatementList.class);
  }
  /**
   * Gets the statements count.
   *
   * @param httpServletResponse the http servlet response
   * @param query the query
   * @param resolvedFilter the filter
   * @return the statements count
   */
  @RequestMapping(value = PATH_STATEMENTS, method = RequestMethod.HEAD)
  @ResponseBody
  public void getStatementsCount(
      HttpServletResponse httpServletResponse,
      RestReadContext restReadContext,
      RestFilter restFilter) {

    ResourceQueryBuilder builder = this.getNewResourceQueryBuilder();

    ResourceQuery resourceQuery =
        builder.addRestFilter(restFilter).addRestReadContext(restReadContext).build();

    int count = this.statementQueryService.count(resourceQuery);

    this.setCount(count, httpServletResponse);
  }