Package fr.gouv.vitam.functional.administration.common.server

# Interface MongoDbAccessReferential

All Known Implementing Classes:
  `MongoDbAccessAdminImpl`

public interface MongoDbAccessReferential
MongoDb Access Referential interface

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DbRequestResult`
  `deleteCollectionForTesting(FunctionalAdminCollections collection)`
  Delete FileFormat collections
  `DbRequestResult`
  `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)`
  `DbRequestResult`
  `findDocumentsWithoutRestrictionOnCurrentTenant(com.fasterxml.jackson.databind.JsonNode select, FunctionalAdminCollections collection)`
  find documents Without Restriction On CurrentTenant
  `VitamDocument<?>`
  `getDocumentById(String id, FunctionalAdminCollections collection)`
  `VitamDocument<?>`
  `getDocumentByUniqueId(String id, FunctionalAdminCollections collection, String field)`
  `DbRequestResult`
  `insertDocument(com.fasterxml.jackson.databind.JsonNode jsonNode, FunctionalAdminCollections collection)`
  insert documents
  `DbRequestResult`
  `insertDocuments(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, FunctionalAdminCollections collection)`
  insert documents
  `DbRequestResult`
  `insertDocuments(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, FunctionalAdminCollections collection, Integer version)`
  insert documents
  `void`
  `replaceDocument(com.fasterxml.jackson.databind.JsonNode document, String identifier, String identifierName, FunctionalAdminCollections vitamCollection)`
  `DbRequestResult`
  `updateData(com.fasterxml.jackson.databind.JsonNode update, FunctionalAdminCollections collection)`
  Update with queryDsl
  `DbRequestResult`
  `updateData(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 documents
      `collection` - collection of Mongo for insert
    Returns:
      DbRequestResult
    Throws:
      `ReferentialException` - when error occurs
      `SchemaValidationException`
      `DocumentAlreadyExistsException`

  - ### insertDocuments

    DbRequestResult insertDocuments(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, FunctionalAdminCollections collection, Integer version) throws DocumentAlreadyExistsException, ReferentialException, SchemaValidationException
    insert documents
    Parameters:
      `arrayNode` - of documents
      `collection` - collection of Mongo for insert
    Returns:
      DbRequestResult
    Throws:
      `ReferentialException` - when error occurs
      `DocumentAlreadyExistsException`
      `SchemaValidationException`

  - ### insertDocument

    DbRequestResult insertDocument(com.fasterxml.jackson.databind.JsonNode jsonNode, FunctionalAdminCollections collection) throws ReferentialException, SchemaValidationException, DocumentAlreadyExistsException
    insert documents
    Parameters:
      `jsonNode` - of documents
      `collection` - collection of Mongo for insert
    Returns:
      DbRequestResult
    Throws:
      `ReferentialException` - when error occurs
      `SchemaValidationException`
      `DocumentAlreadyExistsException`

  - ### deleteCollectionForTesting

    DbRequestResult deleteCollectionForTesting(FunctionalAdminCollections collection, Delete delete) throws DatabaseException, ReferentialException
    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 delete
      `ReferentialException` - when error occurs
      `SchemaValidationException`

  - ### getDocumentById

    VitamDocument<?> getDocumentById(String id, FunctionalAdminCollections collection) throws ReferentialException
    Parameters:
      `id` - of vitam document
      `collection` - 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 value
      `collection` - Mongo collection
      `field` - 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 update
      `collection` - 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 update
      `collection` - collection of Mongo Type for update
      `version` -
    Returns:
      DbRequestResult
    Throws:
      `ReferentialException` - when error occurs;
      `SchemaValidationException`
      `BadRequestException`

  - ### findDocuments

    DbRequestResult findDocuments(com.fasterxml.jackson.databind.JsonNode select, FunctionalAdminCollections collection) throws ReferentialException
    Parameters:
      `select` - filter
      `collection` - collection of Mongo for find
    Returns:
      DbRequestResult
    Throws:
      `ReferentialException` - when error occurs
      `BadRequestException` - 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` - filter
      `collection` - collection of Mongo for find
    Returns:
      DbRequestResult
    Throws:
      `ReferentialException` - when error occurs
      `BadRequestException` - when query is incorrect

  - ### deleteDocument

    DbRequestResult deleteDocument(com.fasterxml.jackson.databind.JsonNode delete, FunctionalAdminCollections collection) throws ReferentialException, BadRequestException, SchemaValidationException
    Parameters:
      `delete` - filter
      `collection` - collection of Mongo for delete
    Returns:
      DbRequestResult
    Throws:
      `ReferentialException` - when error occurs
      `SchemaValidationException`
      `BadRequestException`