public List < Long > getDocumentsForMetadata ( QueryData queryData ) { List < Long > corpusList = queryData . getCorpusList ( ) ; if ( ! corpusList . isEmpty ( ) ) { List < QueryAnnotation > metaData = queryData . getMetaData ( ) ; if ( ! metaData . isEmpty ( ) ) { String documentsWithMetaDataSql = subQueryCorpusSelectionStrategy . buildSubQuery ( corpusList , metaData ) ; List < Long > documents = getJdbcTemplate ( ) . query ( documentsWithMetaDataSql , SingleColumnRowMapper . newInstance ( Long . class ) ) ; return documents ; } } return null ; }
Will query the database which documents are matching according to the given metadata