public class MetadataRepository extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
STORAGE_CONF_FILE |
static String |
STRATEGY_ID |
| Constructor and Description |
|---|
MetadataRepository(com.mongodb.client.MongoDatabase metadataDb,
org.elasticsearch.client.transport.TransportClient transportClient) |
| Modifier and Type | Method and Description |
|---|---|
Optional<UnitModel> |
findUnitById(String rootId)
Find a unit by id
|
boolean |
store(int tenant,
List<UnitGotModel> unitGotList,
boolean storeInDb,
boolean indexInEs)
Store unit and got in database and es
|
public static final String STORAGE_CONF_FILE
public static final String STRATEGY_ID
public MetadataRepository(com.mongodb.client.MongoDatabase metadataDb,
org.elasticsearch.client.transport.TransportClient transportClient)
public Optional<UnitModel> findUnitById(String rootId)
rootId - unitId to fetchpublic boolean 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 storeCopyright © 2018 Vitam. All rights reserved.