private List<Meta> findReprocess(final Collection<Condition> conditions,
                                     final int offset,
                                     final int numberOfRows,
                                     final Set<Integer> usedValKeys) {
        return JooqUtil.contextResult(metaDbConnProvider, context ->
                        metaExpressionMapper.addJoins(
                                        (context
                                                .selectDistinct(
                                                        parent.ID,
                                                        parentFeed.NAME,
                                                        parentType.NAME,
                                                        parentProcessor.PROCESSOR_UUID,
                                                        parentProcessor.PIPELINE_UUID,
                                                        parent.PARENT_ID,
                                                        parent.STATUS,
                                                        parent.STATUS_TIME,
                                                        parent.CREATE_TIME,
                                                        parent.EFFECTIVE_TIME,
                                                        parent.PROCESSOR_FILTER_ID,
                                                        parent.PROCESSOR_TASK_ID
                                                )
                                                .from(meta)
                                                .straightJoin(metaFeed).on(meta.FEED_ID.eq(metaFeed.ID))
                                                .straightJoin(metaType).on(meta.TYPE_ID.eq(metaType.ID))
                                                .leftOuterJoin(metaProcessor).on(meta.PROCESSOR_ID.eq(metaProcessor.ID))
                                                .leftOuterJoin(parent).on(meta.PARENT_ID.eq(parent.ID))
                                                .leftOuterJoin(parentFeed).on(parent.FEED_ID.eq(parentFeed.ID))
                                                .leftOuterJoin(parentType).on(parent.TYPE_ID.eq(parentType.ID))
                                                .leftOuterJoin(parentProcessor).on(parent.PROCESSOR_ID
                                                        .eq(parentProcessor.ID))),
                                        meta.ID,
                                        usedValKeys)
                                .where(conditions)
                                .and(parent.ID.isNotNull())
                                .groupBy(parent.ID)
                                .orderBy(parent.ID)
                                .limit(offset, numberOfRows)
                                .fetch())
                .map(RECORD_TO_PARENT_META_MAPPER::apply);
    }
@return True if any term in any rule expression uses at least one of {@code fields}.
stroom-meta/stroom-meta-impl-db/src/main/java/stroom/meta/impl/db/MetaDaoImpl.java