Queries gerrit for the files included in this patch set.

@param gerritQueryHandler the query handler, responsible for the queries to gerrit.
@return a list of files that are part of this patch set.
779495
public List<String> getFiles(GerritQueryHandler gerritQueryHandler) {
        if (files == null) {
            files = FileHelper.getFilesByChange(gerritQueryHandler, id);
        }
        return files;
    }
1052291
public <T> List<T> search(org.beangle.commons.dao.query.Query<T> query) {
    if (query instanceof LimitQuery) {
      org.beangle.commons.dao.query.LimitQuery<T> limitQuery = (org.beangle.commons.dao.query.LimitQuery<T>) query;
      if (null == limitQuery.getLimit()) {
        return QuerySupport.find(limitQuery, getSession());
      } else {
        return new SinglePage<T>(limitQuery.getLimit().getPageIndex(), limitQuery.getLimit().getPageSize(),
            QuerySupport.count(limitQuery, getSession()), QuerySupport.find(query, getSession()));
      }
    } else {
      return QuerySupport.find(query, getSession());
    }
  }
941014
public List<MessageHandler> getHandlers(IPredicate<MessageHandler> filter) {
        List<MessageHandler> matching = new ArrayList<MessageHandler>();
        for (MessageHandler handler : handlers) {
            if (filter.apply(handler)) {
                matching.add(handler);
            }
        }
        return matching;
    }
824671
private List<Object> getFilePreviews(final String[] fileList, final String locationFull,
      final IStreamProvider streamProvider, final boolean renderResultsAsHtml) {
    final List<Object> files = new ArrayList<>();
    InputStream csvInputStream = null;

    try {
      for (final String fileName : fileList) {
        final Map<String, Object> file = new HashMap<>();
        file.put("name", fileName);

        final String filePath = locationFull + "/" + fileName;
        csvInputStream = streamProvider.getFileInputStream(filePath);
        final Scanner rowScanner = new Scanner(csvInputStream, StandardCharsets.UTF_8.toString());

        final List<Object> lines = new ArrayList<>();
        int lineNumber = 0;
        while (rowScanner.hasNextLine()
            && lineNumber < ReportalMailCreator.NUM_PREVIEW_ROWS) {
          final String csvLine = rowScanner.nextLine();
          final String[] data = csvLine.split("\",\"");
          final List<String> line = new ArrayList<>();
          for (final String item : data) {
            String column = item.replace("\"", "");
            if (!renderResultsAsHtml) {
              column = StringEscapeUtils.escapeHtml(column);
            }
            line.add(column);
          }
          lines.add(line);
          lineNumber++;
        }

        file.put("content", lines);

        if (rowScanner.hasNextLine()) {
          file.put("hasMore", true);
        }

        files.add(file);
        rowScanner.close();
      }
    } catch (final Exception e) {
      logger.debug("Error encountered while processing files in "
          + locationFull, e);
    } finally {
      IOUtils.closeQuietly(csvInputStream);
    }

    return files;
  }
479255
private List<GridFSDBFile> getGFSDBFiles(BasicDBObject mongoQuery, BasicDBObject sort, String collectionName,
            int maxResult, int firstResult)
    {
        KunderaGridFS gfs = new KunderaGridFS(mongoDb, collectionName);
        return gfs.find(mongoQuery, sort, firstResult, maxResult);
    }
999847
public List<QueryImpl> getDependingQueries() {
        if (dependingQueries == null) {
            dependingQueries = usedQueries == null ? Collections.<QueryImpl>emptyList() : collectDependingQueries(new LinkedList<QueryImpl>());
        }
        return dependingQueries;
    }
567427
public List<LogRecord> getView() {
        return new AbstractList<LogRecord>() {
            public LogRecord get(int index) {
                // flip the order
                synchronized (RingBufferLogHandler.this) {
                    return records[(start+(size-(index+1)))%records.length];
                }
            }

            public int size() {
                return size;
            }
        };
    }
913126
@SuppressWarnings(UNCHECKED)
    protected List<E> list(Query query)
    {
        return new ArrayList<E>(query.list());
    }
578466
HandleList getHandleList(boolean create) // d662032
    {
        if (connectionHandleList == null && create)
        {
            connectionHandleList = new HandleList();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "getHandleList: created " + connectionHandleList);
        }

        return connectionHandleList;
    }
869299
public Map<Change, PatchSet> getChanges(GerritQueryHandler gerritQueryHandler) {
        if (StringUtils.isEmpty(name)) {
            logger.error("Topic name can not be empty");
            return Collections.emptyMap();
        }

        if (changes == null) {
            Map<Change, PatchSet> temp = new HashMap<Change, PatchSet>();
            try {
                List<JSONObject> jsonList = gerritQueryHandler.queryCurrentPatchSets("topic:{" + name + "}");
                for (JSONObject json : jsonList) {
                    if (json.has("type") && "stats".equalsIgnoreCase(json.getString("type"))) {
                        continue;
                    }
                    if (json.has("currentPatchSet")) {
                        JSONObject currentPatchSet = json.getJSONObject("currentPatchSet");
                        temp.put(new Change(json), new PatchSet(currentPatchSet));
                    }
                }
                changes = temp;
            } catch (IOException e) {
                logger.error("IOException occured. ", e);
            } catch (GerritQueryException e) {
                logger.error("Bad query. ", e);
            }
        }
        return changes;
    }
391432
public static List<String> getPurgeQueries(PurgeableHivePartitionDataset dataset) {
    List<String> queries = new ArrayList<>();
    queries.add(getUseDbQuery(dataset.getStagingDb()));
    queries.add(getInsertQuery(dataset));
    return queries;
  }
357726
@Override
  public OperationHandle getCatalogs(SessionHandle sessionHandle)
      throws HiveSQLException {
    OperationHandle opHandle = sessionManager.getSession(sessionHandle)
        .getCatalogs();
    LOG.debug(sessionHandle + ": getCatalogs()");
    return opHandle;
  }
118311
public static RequestToken fetchAll(BaasHandler<List<BaasUser>> handler) {
        return fetchAll(null, RequestOptions.DEFAULT, handler);
    }
179496
protected void appendRequestHandler(SolrQuery solrQuery, @Nullable String requestHandler) {
		if (StringUtils.isNotBlank(requestHandler)) {
			solrQuery.add(CommonParams.QT, requestHandler);
		}
	}
1087987
@Override
    public List<Index> listIndexes() throws QueryException {
        try {
            return DatabaseImpl.get(dbQueue.submit(new ListIndexesCallable()));
        }  catch (ExecutionException e) {
            String msg = "Failed to list indexes";
            logger.log(Level.SEVERE, msg, e);
            throw new QueryException(msg, e);
        }

    }
434018
public Iterable<ServerInstanceLogRecordList> getLogLists() throws LogRepositoryException {
		logger.entering(thisClass, "getLogLists");
		
		LogQueryBean query = new LogQueryBean();
		Iterable<ServerInstanceLogRecordList> result = getLogLists(null, query);
		
		logger.exiting(thisClass, "getLogLists", result);
		return result;
	}
1091390
public static SolrItemHandler getInstance(String collection) throws Exception {
        SolrItemHandler INSTANCE = INSTANCES.get(collection);
        if (INSTANCE == null) {
            INSTANCE = new SolrItemHandler(collection);

            INSTANCES.put(collection, INSTANCE);
        }
        return INSTANCE;
    }