Interface MongoDbAccessReferential
-
- All Known Implementing Classes:
MongoDbAccessAdminImpl
public interface MongoDbAccessReferential
MongoDb Access Referential interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DbRequestResult
deleteCollectionForTesting(FunctionalAdminCollections collection)
Delete FileFormat collectionsDbRequestResult
deleteCollectionForTesting(FunctionalAdminCollections collection, Delete delete)
DbRequestResult
deleteDocument(com.fasterxml.jackson.databind.JsonNode delete, FunctionalAdminCollections collection)
DbRequestResult
findDocuments(com.fasterxml.jackson.databind.JsonNode select, FunctionalAdminCollections collection)
VitamDocument<?>
getDocumentById(java.lang.String id, FunctionalAdminCollections collection)
VitamDocument<?>
getDocumentByUniqueId(java.lang.String id, FunctionalAdminCollections collection, java.lang.String field)
DbRequestResult
insertDocument(com.fasterxml.jackson.databind.JsonNode jsonNode, FunctionalAdminCollections collection)
insert documentsDbRequestResult
insertDocuments(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, FunctionalAdminCollections collection)
insert documentsDbRequestResult
insertDocuments(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, FunctionalAdminCollections collection, java.lang.Integer version)
insert documentsvoid
replaceDocument(com.fasterxml.jackson.databind.JsonNode document, java.lang.String identifier, java.lang.String identifierName, FunctionalAdminCollections vitamCollection)
DbRequestResult
updateData(com.fasterxml.jackson.databind.JsonNode update, FunctionalAdminCollections collection)
Update with queryDslDbRequestResult
updateData(com.fasterxml.jackson.databind.JsonNode update, FunctionalAdminCollections collection, java.lang.Integer version)
Update with queryDsl
-
-
-
Method Detail
-
insertDocuments
DbRequestResult insertDocuments(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, FunctionalAdminCollections collection) throws ReferentialException, SchemaValidationException, DocumentAlreadyExistsException
insert documents- Parameters:
arrayNode
- of documentscollection
- collection of Mongo for insert- Returns:
- DbRequestResult
- Throws:
ReferentialException
- when error occursSchemaValidationException
DocumentAlreadyExistsException
-
insertDocuments
DbRequestResult insertDocuments(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, FunctionalAdminCollections collection, java.lang.Integer version) throws DocumentAlreadyExistsException, ReferentialException, SchemaValidationException
insert documents- Parameters:
arrayNode
- of documentscollection
- collection of Mongo for insert- Returns:
- DbRequestResult
- Throws:
ReferentialException
- when error occursDocumentAlreadyExistsException
SchemaValidationException
-
insertDocument
DbRequestResult insertDocument(com.fasterxml.jackson.databind.JsonNode jsonNode, FunctionalAdminCollections collection) throws ReferentialException, SchemaValidationException, DocumentAlreadyExistsException
insert documents- Parameters:
jsonNode
- of documentscollection
- collection of Mongo for insert- Returns:
- DbRequestResult
- Throws:
ReferentialException
- when error occursSchemaValidationException
DocumentAlreadyExistsException
-
deleteCollectionForTesting
DbRequestResult deleteCollectionForTesting(FunctionalAdminCollections collection, Delete delete) throws DatabaseException, ReferentialException
-
deleteCollectionForTesting
DbRequestResult deleteCollectionForTesting(FunctionalAdminCollections collection) throws DatabaseException, ReferentialException, SchemaValidationException
Delete FileFormat collections- Parameters:
collection
- collection of Mongo for delete- Returns:
- DbRequestResult
- Throws:
DatabaseException
- thrown when error on deleteReferentialException
- when error occursSchemaValidationException
-
getDocumentById
VitamDocument<?> getDocumentById(java.lang.String id, FunctionalAdminCollections collection) throws ReferentialException
- Parameters:
id
- of vitam documentcollection
- collection of Mongo- Returns:
- vitam document
- Throws:
ReferentialException
- when error occurs
-
getDocumentByUniqueId
VitamDocument<?> getDocumentByUniqueId(java.lang.String id, FunctionalAdminCollections collection, java.lang.String field) throws ReferentialException
- Parameters:
id
- functional id valuecollection
- Mongo collectionfield
- unique field in collection as functional id- Returns:
- Throws:
ReferentialException
-
replaceDocument
void replaceDocument(com.fasterxml.jackson.databind.JsonNode document, java.lang.String identifier, java.lang.String identifierName, FunctionalAdminCollections vitamCollection) throws DatabaseException
- Throws:
DatabaseException
-
updateData
DbRequestResult updateData(com.fasterxml.jackson.databind.JsonNode update, FunctionalAdminCollections collection) throws ReferentialException, SchemaValidationException, BadRequestException
Update with queryDsl- Parameters:
update
- JsonNode to updatecollection
- collection of Mongo Type for update- Returns:
- DbRequestResult
- Throws:
ReferentialException
- when error occurs;SchemaValidationException
BadRequestException
-
updateData
DbRequestResult updateData(com.fasterxml.jackson.databind.JsonNode update, FunctionalAdminCollections collection, java.lang.Integer version) throws ReferentialException, SchemaValidationException, BadRequestException
Update with queryDsl- Parameters:
update
- JsonNode to updatecollection
- collection of Mongo Type for updateversion
-- Returns:
- DbRequestResult
- Throws:
ReferentialException
- when error occurs;SchemaValidationException
BadRequestException
-
findDocuments
DbRequestResult findDocuments(com.fasterxml.jackson.databind.JsonNode select, FunctionalAdminCollections collection) throws ReferentialException
- Parameters:
select
- filtercollection
- collection of Mongo for find- Returns:
- DbRequestResult
- Throws:
ReferentialException
- when error occursBadRequestException
- when query is incorrect
-
deleteDocument
DbRequestResult deleteDocument(com.fasterxml.jackson.databind.JsonNode delete, FunctionalAdminCollections collection) throws ReferentialException, BadRequestException, SchemaValidationException
- Parameters:
delete
- filtercollection
- collection of Mongo for delete- Returns:
- DbRequestResult
- Throws:
ReferentialException
- when error occursSchemaValidationException
BadRequestException
-
-