@Test public void test_extractMetaInfo_emptyListIds() { assertTrue(europeanaDao.retrieveMetaInfo(Collections.EMPTY_LIST).isEmpty()); }
public List<SourceDocumentReferenceMetaInfo> retrieveMetaInfo(final Collection<String> sourceDocumentReferenceIds) { if (null == sourceDocumentReferenceIds || sourceDocumentReferenceIds.isEmpty()) { return Collections.EMPTY_LIST; } LOG.debug(LoggingComponent.appendAppFields(LoggingComponent.Migrator.PERSISTENCE_EUROPEANA), "Retrieving metainfo for #" + sourceDocumentReferenceIds.size()); final Timer.Context context = PublisherMetrics.Publisher.Read.Mongo.mongoGetMetaInfoDuration.time(); try { if (null == sourceDocumentReferenceIds || sourceDocumentReferenceIds.isEmpty()) { return Collections.EMPTY_LIST; } return sourceDocumentReferenceMetaInfoDao.read(sourceDocumentReferenceIds); } finally { context.close(); LOG.debug(LoggingComponent.appendAppFields(LoggingComponent.Migrator.PERSISTENCE_EUROPEANA), "Done retrieving"); } }
PublisherEuropeanaDao { public List<SourceDocumentReferenceMetaInfo> retrieveMetaInfo(final Collection<String> sourceDocumentReferenceIds) { if (null == sourceDocumentReferenceIds || sourceDocumentReferenceIds.isEmpty()) { return Collections.EMPTY_LIST; } LOG.debug(LoggingComponent.appendAppFields(LoggingComponent.Migrator.PERSISTENCE_EUROPEANA), "Retrieving metainfo for #" + sourceDocumentReferenceIds.size()); final Timer.Context context = PublisherMetrics.Publisher.Read.Mongo.mongoGetMetaInfoDuration.time(); try { if (null == sourceDocumentReferenceIds || sourceDocumentReferenceIds.isEmpty()) { return Collections.EMPTY_LIST; } return sourceDocumentReferenceMetaInfoDao.read(sourceDocumentReferenceIds); } finally { context.close(); LOG.debug(LoggingComponent.appendAppFields(LoggingComponent.Migrator.PERSISTENCE_EUROPEANA), "Done retrieving"); } } }
PublisherEuropeanaDao { public List<SourceDocumentReferenceMetaInfo> retrieveMetaInfo(final Collection<String> sourceDocumentReferenceIds) { if (null == sourceDocumentReferenceIds || sourceDocumentReferenceIds.isEmpty()) { return Collections.EMPTY_LIST; } LOG.debug(LoggingComponent.appendAppFields(LoggingComponent.Migrator.PERSISTENCE_EUROPEANA), "Retrieving metainfo for #" + sourceDocumentReferenceIds.size()); final Timer.Context context = PublisherMetrics.Publisher.Read.Mongo.mongoGetMetaInfoDuration.time(); try { if (null == sourceDocumentReferenceIds || sourceDocumentReferenceIds.isEmpty()) { return Collections.EMPTY_LIST; } return sourceDocumentReferenceMetaInfoDao.read(sourceDocumentReferenceIds); } finally { context.close(); LOG.debug(LoggingComponent.appendAppFields(LoggingComponent.Migrator.PERSISTENCE_EUROPEANA), "Done retrieving"); } } PublisherEuropeanaDao(MongoConfig mongoConfig); }
PublisherEuropeanaDao { public List<SourceDocumentReferenceMetaInfo> retrieveMetaInfo(final Collection<String> sourceDocumentReferenceIds) { if (null == sourceDocumentReferenceIds || sourceDocumentReferenceIds.isEmpty()) { return Collections.EMPTY_LIST; } LOG.debug(LoggingComponent.appendAppFields(LoggingComponent.Migrator.PERSISTENCE_EUROPEANA), "Retrieving metainfo for #" + sourceDocumentReferenceIds.size()); final Timer.Context context = PublisherMetrics.Publisher.Read.Mongo.mongoGetMetaInfoDuration.time(); try { if (null == sourceDocumentReferenceIds || sourceDocumentReferenceIds.isEmpty()) { return Collections.EMPTY_LIST; } return sourceDocumentReferenceMetaInfoDao.read(sourceDocumentReferenceIds); } finally { context.close(); LOG.debug(LoggingComponent.appendAppFields(LoggingComponent.Migrator.PERSISTENCE_EUROPEANA), "Done retrieving"); } } PublisherEuropeanaDao(MongoConfig mongoConfig); DB getMongoDB(); List<HarvesterRecord> retrieveRecords(final DBCursor cursor, final String publishingBatchId); @Deprecated long countNumberOfDocumentUpdatedBefore(final DateTime dateFilter); List<SourceDocumentReferenceMetaInfo> retrieveMetaInfo(final Collection<String> sourceDocumentReferenceIds); DBCursor buildCursorForDocumentStatistics(final int batchSize, final DateTime dateFilter); }
PublisherEuropeanaDao { public List<SourceDocumentReferenceMetaInfo> retrieveMetaInfo(final Collection<String> sourceDocumentReferenceIds) { if (null == sourceDocumentReferenceIds || sourceDocumentReferenceIds.isEmpty()) { return Collections.EMPTY_LIST; } LOG.debug(LoggingComponent.appendAppFields(LoggingComponent.Migrator.PERSISTENCE_EUROPEANA), "Retrieving metainfo for #" + sourceDocumentReferenceIds.size()); final Timer.Context context = PublisherMetrics.Publisher.Read.Mongo.mongoGetMetaInfoDuration.time(); try { if (null == sourceDocumentReferenceIds || sourceDocumentReferenceIds.isEmpty()) { return Collections.EMPTY_LIST; } return sourceDocumentReferenceMetaInfoDao.read(sourceDocumentReferenceIds); } finally { context.close(); LOG.debug(LoggingComponent.appendAppFields(LoggingComponent.Migrator.PERSISTENCE_EUROPEANA), "Done retrieving"); } } PublisherEuropeanaDao(MongoConfig mongoConfig); DB getMongoDB(); List<HarvesterRecord> retrieveRecords(final DBCursor cursor, final String publishingBatchId); @Deprecated long countNumberOfDocumentUpdatedBefore(final DateTime dateFilter); List<SourceDocumentReferenceMetaInfo> retrieveMetaInfo(final Collection<String> sourceDocumentReferenceIds); DBCursor buildCursorForDocumentStatistics(final int batchSize, final DateTime dateFilter);  }