Class MetadataRepositoryService
java.lang.Object
fr.gouv.vitam.metadata.core.database.collections.MetadataRepositoryService
Metadata repository : direct access to databases
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNode
getDocumentById
(MetadataCollections collection, String id, Integer tenant) Retrieve document by its ID in a given collection filtered by a tenant in mongoList<com.fasterxml.jackson.databind.JsonNode>
getDocumentsByIds
(MetadataCollections collection, Collection<String> ids, Integer tenant) Retrieve document by its ID in a given collection filtered by a tenant in mongo
-
Constructor Details
-
MetadataRepositoryService
-
-
Method Details
-
getDocumentById
public com.fasterxml.jackson.databind.JsonNode getDocumentById(MetadataCollections collection, String id, Integer tenant) throws DatabaseException, MetaDataNotFoundException, InvalidParseOperationException Retrieve document by its ID in a given collection filtered by a tenant in mongo- Parameters:
collection
- collectionid
- idtenant
- tenant- Returns:
- the document as JsonNode
- Throws:
DatabaseException
- database access errorMetaDataNotFoundException
- document not foundInvalidParseOperationException
- could not parse response
-
getDocumentsByIds
public List<com.fasterxml.jackson.databind.JsonNode> getDocumentsByIds(MetadataCollections collection, Collection<String> ids, Integer tenant) throws InvalidParseOperationException Retrieve document by its ID in a given collection filtered by a tenant in mongo- Parameters:
collection
- collectionids
- idstenant
- tenant- Returns:
- the document as JsonNode
- Throws:
InvalidParseOperationException
- could not parse response
-