Class CollectRepository
- java.lang.Object
-
- fr.gouv.vitam.collect.internal.repository.CollectRepository
-
public class CollectRepository extends java.lang.Object
repository for collect entities management in mongo.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COLLECT_COLLECTION
static java.lang.String
ID
-
Constructor Summary
Constructors Constructor Description CollectRepository(MongoDbAccess mongoDbAccess)
CollectRepository(MongoDbAccess mongoDbAccess, java.lang.String collectionName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createCollect(CollectModel collectModel)
create a collect modeljava.util.Optional<CollectModel>
findCollect(java.lang.String id)
return collection according to idvoid
replaceCollect(CollectModel collectModel)
replace a collect model
-
-
-
Field Detail
-
COLLECT_COLLECTION
public static final java.lang.String COLLECT_COLLECTION
- See Also:
- Constant Field Values
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CollectRepository
public CollectRepository(MongoDbAccess mongoDbAccess, java.lang.String collectionName)
-
CollectRepository
public CollectRepository(MongoDbAccess mongoDbAccess)
-
-
Method Detail
-
createCollect
public void createCollect(CollectModel collectModel) throws CollectException
create a collect model- Parameters:
collectModel
- collect model to create- Throws:
CollectException
- exception thrown in case of error
-
replaceCollect
public void replaceCollect(CollectModel collectModel) throws CollectException
replace a collect model- Parameters:
collectModel
- collect model to replace- Throws:
CollectException
- exception thrown in case of error
-
findCollect
public java.util.Optional<CollectModel> findCollect(java.lang.String id) throws CollectException
return collection according to id- Parameters:
id
- collect id to find- Returns:
- Optional
- Throws:
CollectException
- exception thrown in case of error
-
-