@ Override public Iterable < TableReportEntry > getReportEntries ( String reportId , final AllTablesReportQuery query ) { checkNotNull ( reportId , "reportId" ) ; final String reportTable = getTableName ( reportId ) ; // Set up several filters based on the query attributes final Predicate < String > placementFilter = query . getPlacements ( ) . isEmpty ( ) ? Predicates . < String > alwaysTrue ( ) : Predicates . in ( query . getPlacements ( ) ) ; final Predicate < Boolean > droppedFilter = query . isIncludeDropped ( ) ? Predicates . < Boolean > alwaysTrue ( ) : Predicates . equalTo ( false ) ; final Predicate < Boolean > facadeFilter = query . isIncludeFacades ( ) ? Predicates . < Boolean > alwaysTrue ( ) : Predicates . equalTo ( false ) ; return new Iterable < TableReportEntry > ( ) { @ Override public Iterator < TableReportEntry > iterator ( ) { return Iterators . limit ( Iterators . filter ( Iterators . transform ( queryDataStoreForTableReportResults ( reportTable , query ) , new Function < Map < String , Object > , TableReportEntry > ( ) { @ Nullable @ Override public TableReportEntry apply ( Map < String , Object > map ) { if ( Intrinsic . getId ( map ) . startsWith ( "~" ) ) { // Skip this row, it's the metadata return null ; } return convertToTableReportEntry ( map , placementFilter , droppedFilter , facadeFilter ) ; } } ) , Predicates . notNull ( ) ) , query . getLimit ( ) ) ; } } ; }
Returns the matching table report entries for a report ID and query parameters .