Class MetadataRepositoryService
- java.lang.Object
-
- fr.gouv.vitam.metadata.core.database.collections.MetadataRepositoryService
-
public class MetadataRepositoryService extends java.lang.ObjectMetadata repository : direct access to databases
-
-
Constructor Summary
Constructors Constructor Description MetadataRepositoryService(VitamRepositoryProvider vitamRepositoryProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNodegetDocumentById(MetadataCollections collection, java.lang.String id, java.lang.Integer tenant)Retrieve document by its ID in a given collection filtered by a tenant in mongojava.util.List<com.fasterxml.jackson.databind.JsonNode>getDocumentsByIds(MetadataCollections collection, java.util.Collection<java.lang.String> ids, java.lang.Integer tenant)Retrieve document by its ID in a given collection filtered by a tenant in mongo
-
-
-
Constructor Detail
-
MetadataRepositoryService
public MetadataRepositoryService(VitamRepositoryProvider vitamRepositoryProvider)
-
-
Method Detail
-
getDocumentById
public com.fasterxml.jackson.databind.JsonNode getDocumentById(MetadataCollections collection, java.lang.String id, java.lang.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 java.util.List<com.fasterxml.jackson.databind.JsonNode> getDocumentsByIds(MetadataCollections collection, java.util.Collection<java.lang.String> ids, java.lang.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
-
-