@Test public void filterResultsWithOneColumn() { List<Object> results = Arrays.asList(13, 27); assertSame(results, this.queryFilter.filterResults(results)); }
@Override public List filterResults(List results) { if (results.size() > 0 && results.get(0).getClass().isArray()) { List<AttachmentReference> attachmentReferences = new ArrayList<>(); for (Object result : results) { Object[] actualResult = (Object[]) result; String documentFullName = String.valueOf(actualResult[0]); String attachmentFileName = String.valueOf(actualResult[1]); DocumentReference documentReference = this.documentReferenceResolver.resolve(documentFullName); attachmentReferences.add(new AttachmentReference(attachmentFileName, documentReference)); } return attachmentReferences; } return results; }
AttachmentQueryFilter extends AbstractWhereQueryFilter { @Override public List filterResults(List results) { if (results.size() > 0 && results.get(0).getClass().isArray()) { List<AttachmentReference> attachmentReferences = new ArrayList<>(); for (Object result : results) { Object[] actualResult = (Object[]) result; String documentFullName = String.valueOf(actualResult[0]); String attachmentFileName = String.valueOf(actualResult[1]); DocumentReference documentReference = this.documentReferenceResolver.resolve(documentFullName); attachmentReferences.add(new AttachmentReference(attachmentFileName, documentReference)); } return attachmentReferences; } return results; } }
AttachmentQueryFilter extends AbstractWhereQueryFilter { @Override public List filterResults(List results) { if (results.size() > 0 && results.get(0).getClass().isArray()) { List<AttachmentReference> attachmentReferences = new ArrayList<>(); for (Object result : results) { Object[] actualResult = (Object[]) result; String documentFullName = String.valueOf(actualResult[0]); String attachmentFileName = String.valueOf(actualResult[1]); DocumentReference documentReference = this.documentReferenceResolver.resolve(documentFullName); attachmentReferences.add(new AttachmentReference(attachmentFileName, documentReference)); } return attachmentReferences; } return results; }  }
AttachmentQueryFilter extends AbstractWhereQueryFilter { @Override public List filterResults(List results) { if (results.size() > 0 && results.get(0).getClass().isArray()) { List<AttachmentReference> attachmentReferences = new ArrayList<>(); for (Object result : results) { Object[] actualResult = (Object[]) result; String documentFullName = String.valueOf(actualResult[0]); String attachmentFileName = String.valueOf(actualResult[1]); DocumentReference documentReference = this.documentReferenceResolver.resolve(documentFullName); attachmentReferences.add(new AttachmentReference(attachmentFileName, documentReference)); } return attachmentReferences; } return results; }  @Override String filterStatement(String statement, String language); @Override List filterResults(List results); }
AttachmentQueryFilter extends AbstractWhereQueryFilter { @Override public List filterResults(List results) { if (results.size() > 0 && results.get(0).getClass().isArray()) { List<AttachmentReference> attachmentReferences = new ArrayList<>(); for (Object result : results) { Object[] actualResult = (Object[]) result; String documentFullName = String.valueOf(actualResult[0]); String attachmentFileName = String.valueOf(actualResult[1]); DocumentReference documentReference = this.documentReferenceResolver.resolve(documentFullName); attachmentReferences.add(new AttachmentReference(attachmentFileName, documentReference)); } return attachmentReferences; } return results; }  @Override String filterStatement(String statement, String language); @Override List filterResults(List results);  }