code: protected BE getSingle(Query query, SegmentType entityType) {
          return inTx(tx -> Util.getSingle(tx, query, entityType));
      }
docs: A helper method to retrieve a single result from the query or throw an exception if the query yields no results.
  
  @param query      the query to run
  @param entityType the expected type of the entity (used only for error reporting)
  @return the single result
  @throws EntityNotFoundException if the query doesn't return any results