Class DocumentDAO

    • Constructor Detail

      • DocumentDAO

        public DocumentDAO()
    • Method Detail

      • getDocumentEtag

        public org.bson.Document getDocumentEtag​(com.mongodb.client.ClientSession cs,
                                                 String dbName,
                                                 String collName,
                                                 Object documentId)
        Description copied from interface: DocumentRepository
        returns the ETag of the document
        Specified by:
        getDocumentEtag in interface DocumentRepository
        Parameters:
        cs - the client session
        dbName -
        collName -
        documentId -
        Returns:
      • upsertDocument

        public OperationResult upsertDocument​(com.mongodb.client.ClientSession cs,
                                              String dbName,
                                              String collName,
                                              Object documentId,
                                              org.bson.BsonDocument filter,
                                              org.bson.BsonDocument shardKeys,
                                              org.bson.BsonDocument newContent,
                                              String requestEtag,
                                              boolean patching,
                                              boolean checkEtag)
        Specified by:
        upsertDocument in interface DocumentRepository
        Parameters:
        cs - the client session
        dbName -
        collName -
        documentId -
        shardKeys -
        newContent -
        requestEtag -
        patching -
        checkEtag -
        Returns:
        the HttpStatus code
      • upsertDocumentPost

        public OperationResult upsertDocumentPost​(com.mongodb.client.ClientSession cs,
                                                  String dbName,
                                                  String collName,
                                                  org.bson.BsonDocument filter,
                                                  org.bson.BsonDocument shardKeys,
                                                  org.bson.BsonDocument newContent,
                                                  String requestEtag,
                                                  boolean checkEtag)
        Specified by:
        upsertDocumentPost in interface DocumentRepository
        Parameters:
        cs - the client session
        dbName -
        collName -
        shardKeys -
        newContent -
        requestEtag -
        checkEtag -
        Returns:
      • bulkUpsertDocumentsPost

        public BulkOperationResult bulkUpsertDocumentsPost​(com.mongodb.client.ClientSession cs,
                                                           String dbName,
                                                           String collName,
                                                           org.bson.BsonArray documents,
                                                           org.bson.BsonDocument filter,
                                                           org.bson.BsonDocument shardKeys)
        Specified by:
        bulkUpsertDocumentsPost in interface DocumentRepository
        Parameters:
        cs - the client session
        dbName -
        collName -
        documents -
        shardKeys -
        Returns:
      • deleteDocument

        public OperationResult deleteDocument​(com.mongodb.client.ClientSession cs,
                                              String dbName,
                                              String collName,
                                              Object documentId,
                                              org.bson.BsonDocument filter,
                                              org.bson.BsonDocument shardedKeys,
                                              String requestEtag,
                                              boolean checkEtag)
        Specified by:
        deleteDocument in interface DocumentRepository
        Parameters:
        cs - the client session
        dbName -
        collName -
        documentId -
        filter -
        shardedKeys -
        requestEtag -
        checkEtag -
        Returns:
      • bulkDeleteDocuments

        public BulkOperationResult bulkDeleteDocuments​(com.mongodb.client.ClientSession cs,
                                                       String dbName,
                                                       String collName,
                                                       org.bson.BsonDocument filter,
                                                       org.bson.BsonDocument shardedKeys)
        Specified by:
        bulkDeleteDocuments in interface DocumentRepository
        Parameters:
        cs - the client session
        dbName -
        collName -
        filter -
        shardedKeys -
        Returns:
      • bulkPatchDocuments

        public BulkOperationResult bulkPatchDocuments​(com.mongodb.client.ClientSession cs,
                                                      String dbName,
                                                      String collName,
                                                      org.bson.BsonDocument filter,
                                                      org.bson.BsonDocument shardedKeys,
                                                      org.bson.BsonDocument data)
        Specified by:
        bulkPatchDocuments in interface DocumentRepository
        Parameters:
        cs - the client session
        dbName -
        collName -
        filter -
        shardedKeys -
        data -
        Returns: