Interface MongoDbAccessReferential
- All Known Implementing Classes:
MongoDbAccessAdminImpl
public interface MongoDbAccessReferential
MongoDb Access Referential interface
-
Method Summary
Modifier and TypeMethodDescriptiondeleteCollectionForTesting
(FunctionalAdminCollections collection) Delete FileFormat collectionsdeleteCollectionForTesting
(FunctionalAdminCollections collection, Delete delete) deleteDocument
(com.fasterxml.jackson.databind.JsonNode delete, FunctionalAdminCollections collection) findDocuments
(com.fasterxml.jackson.databind.JsonNode select, FunctionalAdminCollections collection) findDocumentsWithoutRestrictionOnCurrentTenant
(com.fasterxml.jackson.databind.JsonNode select, FunctionalAdminCollections collection) find documents Without Restriction On CurrentTenantgetDocumentById
(String id, FunctionalAdminCollections collection) getDocumentByUniqueId
(String id, FunctionalAdminCollections collection, String field) insertDocument
(com.fasterxml.jackson.databind.JsonNode jsonNode, FunctionalAdminCollections collection) insert documentsinsertDocuments
(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, FunctionalAdminCollections collection) insert documentsinsertDocuments
(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, FunctionalAdminCollections collection, Integer version) insert documentsvoid
replaceDocument
(com.fasterxml.jackson.databind.JsonNode document, String identifier, String identifierName, FunctionalAdminCollections vitamCollection) updateData
(com.fasterxml.jackson.databind.JsonNode update, FunctionalAdminCollections collection) Update with queryDslupdateData
(com.fasterxml.jackson.databind.JsonNode update, FunctionalAdminCollections collection, Integer version) Update with queryDsl
-
Method Details
-
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, 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(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(String id, FunctionalAdminCollections collection, 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, String identifier, 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, 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
-
findDocumentsWithoutRestrictionOnCurrentTenant
DbRequestResult findDocumentsWithoutRestrictionOnCurrentTenant(com.fasterxml.jackson.databind.JsonNode select, FunctionalAdminCollections collection) throws ReferentialException find documents Without Restriction On CurrentTenant- 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
-