@Test public void getQueryResult() throws SQLException { QueryResultSet<SwiftNode> resultSet = query.getQueryResult(); assertTrue(resultSet.hasNextPage()); List<Row> rows = new ArrayList<Row>(); while (resultSet.hasNextPage()) { rows.addAll(IteratorUtils.iterator2List(SwiftNodeUtils.node2RowIterator(resultSet.getPage()))); } assertTrue(rows.size() > 0); assertEquals(expected, rows); resultSet.convert(new SwiftMetaDataEntity()); }
@Override public QueryResultSet<SwiftNode> getQueryResult() throws SQLException { SwiftNodeOperator operator = new SwiftNodeOperator() { @Override public SwiftNode apply(SwiftNode node) { if (node.getChildren().isEmpty()) { for (MatchFilter matchFilter : matchFilterList) { if (!matchFilter.matches(node)) { return null; } } return node; } NodeFilter.filter(node, matchFilterList); return node; } }; return new ChainedNodeQueryResultSet(operator, query.getQueryResult()); }
HavingFilterQuery implements Query<QueryResultSet<SwiftNode>> { @Override public QueryResultSet<SwiftNode> getQueryResult() throws SQLException { SwiftNodeOperator operator = new SwiftNodeOperator() { @Override public SwiftNode apply(SwiftNode node) { if (node.getChildren().isEmpty()) { for (MatchFilter matchFilter : matchFilterList) { if (!matchFilter.matches(node)) { return null; } } return node; } NodeFilter.filter(node, matchFilterList); return node; } }; return new ChainedNodeQueryResultSet(operator, query.getQueryResult()); } }
HavingFilterQuery implements Query<QueryResultSet<SwiftNode>> { @Override public QueryResultSet<SwiftNode> getQueryResult() throws SQLException { SwiftNodeOperator operator = new SwiftNodeOperator() { @Override public SwiftNode apply(SwiftNode node) { if (node.getChildren().isEmpty()) { for (MatchFilter matchFilter : matchFilterList) { if (!matchFilter.matches(node)) { return null; } } return node; } NodeFilter.filter(node, matchFilterList); return node; } }; return new ChainedNodeQueryResultSet(operator, query.getQueryResult()); } HavingFilterQuery(Query<QueryResultSet<SwiftNode>> query, List<MatchFilter> matchFilterList); }
HavingFilterQuery implements Query<QueryResultSet<SwiftNode>> { @Override public QueryResultSet<SwiftNode> getQueryResult() throws SQLException { SwiftNodeOperator operator = new SwiftNodeOperator() { @Override public SwiftNode apply(SwiftNode node) { if (node.getChildren().isEmpty()) { for (MatchFilter matchFilter : matchFilterList) { if (!matchFilter.matches(node)) { return null; } } return node; } NodeFilter.filter(node, matchFilterList); return node; } }; return new ChainedNodeQueryResultSet(operator, query.getQueryResult()); } HavingFilterQuery(Query<QueryResultSet<SwiftNode>> query, List<MatchFilter> matchFilterList); @Override QueryResultSet<SwiftNode> getQueryResult(); }
HavingFilterQuery implements Query<QueryResultSet<SwiftNode>> { @Override public QueryResultSet<SwiftNode> getQueryResult() throws SQLException { SwiftNodeOperator operator = new SwiftNodeOperator() { @Override public SwiftNode apply(SwiftNode node) { if (node.getChildren().isEmpty()) { for (MatchFilter matchFilter : matchFilterList) { if (!matchFilter.matches(node)) { return null; } } return node; } NodeFilter.filter(node, matchFilterList); return node; } }; return new ChainedNodeQueryResultSet(operator, query.getQueryResult()); } HavingFilterQuery(Query<QueryResultSet<SwiftNode>> query, List<MatchFilter> matchFilterList); @Override QueryResultSet<SwiftNode> getQueryResult();  }