public class MetadataRepository extends Object
Modifier and Type | Field and Description |
---|---|
static String |
STRATEGY_ID |
Constructor and Description |
---|
MetadataRepository(com.mongodb.client.MongoDatabase metadataDb,
org.elasticsearch.client.transport.TransportClient transportClient,
StoragePopulateImpl storagePopulateService) |
Modifier and Type | Method and Description |
---|---|
Map<String,com.fasterxml.jackson.databind.JsonNode> |
findRawMetadataByIds(List<String> ids,
VitamDataType vitamDataType)
Find raw metadata by ids
|
Optional<UnitModel> |
findUnitById(String rootId)
Find a unit by id
|
void |
store(int tenant,
List<UnitGotModel> unitGotList,
boolean storeInDb,
boolean indexInEs)
Store unit and got in database and es
|
public static final String STRATEGY_ID
public MetadataRepository(com.mongodb.client.MongoDatabase metadataDb, org.elasticsearch.client.transport.TransportClient transportClient, StoragePopulateImpl storagePopulateService)
public Optional<UnitModel> findUnitById(String rootId)
rootId
- unitId to fetchpublic void store(int tenant, List<UnitGotModel> unitGotList, boolean storeInDb, boolean indexInEs)
tenant
- tenant identifierstoreInDb
- if true documents will be saved in DBindexInEs
- if true documents will be indexed in ESunitGotList
- data list of (unit,got) to storepublic Map<String,com.fasterxml.jackson.databind.JsonNode> findRawMetadataByIds(List<String> ids, VitamDataType vitamDataType)
ids
- the document idsvitamDataType
- the metadata typeCopyright © 2018 Vitam. All rights reserved.