Package org.restheart.mongodb.db
Interface DocumentRepository
- All Known Implementing Classes:
DocumentDAO
public interface DocumentRepository
- Author:
- Maurizio Turatti <maurizio@softinstigate.com>
-
Method Summary
Modifier and TypeMethodDescriptionbulkDeleteDocuments(com.mongodb.client.ClientSession cs, String dbName, String collName, org.bson.BsonDocument filter, org.bson.BsonDocument shardKeys)bulkPatchDocuments(com.mongodb.client.ClientSession cs, String dbName, String collName, org.bson.BsonDocument filter, org.bson.BsonDocument shardKeys, org.bson.BsonDocument data)bulkPostDocuments(com.mongodb.client.ClientSession cs, String dbName, String collName, org.bson.BsonArray documents, org.bson.BsonDocument filter, org.bson.BsonDocument shardKeys, ExchangeKeys.WRITE_MODE writeMode)deleteDocument(com.mongodb.client.ClientSession cs, String dbName, String collName, Object documentId, org.bson.BsonDocument filter, org.bson.BsonDocument shardedKeys, String requestEtag, boolean checkEtag)org.bson.BsonDocumentgetDocumentEtag(com.mongodb.client.ClientSession cs, String dbName, String collName, Object documentId)returns the ETag of the documentwriteDocument(com.mongodb.client.ClientSession cs, String dbName, String collName, Object documentId, org.bson.BsonDocument filter, org.bson.BsonDocument shardedKeys, org.bson.BsonDocument content, String requestEtag, boolean patching, ExchangeKeys.WRITE_MODE writeMode, boolean checkEtag)writeDocumentPost(com.mongodb.client.ClientSession cs, String dbName, String collName, org.bson.BsonDocument filter, org.bson.BsonDocument shardedKeys, org.bson.BsonDocument content, ExchangeKeys.WRITE_MODE writeMode, String requestEtag, boolean checkEtag)
-
Method Details
-
writeDocument
OperationResult writeDocument(com.mongodb.client.ClientSession cs, String dbName, String collName, Object documentId, org.bson.BsonDocument filter, org.bson.BsonDocument shardedKeys, org.bson.BsonDocument content, String requestEtag, boolean patching, ExchangeKeys.WRITE_MODE writeMode, boolean checkEtag)- Parameters:
cs- the client sessiondbName-collName-documentId-filter-shardedKeys-content-requestEtag-patching-writeMode-checkEtag-- Returns:
- the OperationResult
-
writeDocumentPost
OperationResult writeDocumentPost(com.mongodb.client.ClientSession cs, String dbName, String collName, org.bson.BsonDocument filter, org.bson.BsonDocument shardedKeys, org.bson.BsonDocument content, ExchangeKeys.WRITE_MODE writeMode, String requestEtag, boolean checkEtag)- Parameters:
cs- the client sessiondbName-collName-filter-shardedKeys-content-writeMode-requestEtag-checkEtag-- Returns:
- the OperationResult
-
deleteDocument
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)- Parameters:
cs- the client sessiondbName-collName-documentId-filter-shardedKeys-requestEtag-checkEtag-- Returns:
- the OperationResult
-
bulkPostDocuments
BulkOperationResult bulkPostDocuments(com.mongodb.client.ClientSession cs, String dbName, String collName, org.bson.BsonArray documents, org.bson.BsonDocument filter, org.bson.BsonDocument shardKeys, ExchangeKeys.WRITE_MODE writeMode)- Parameters:
cs- the client sessiondbName-collName-documents-filter-shardKeys-writeMode-- Returns:
- the BulkOperationResult
-
bulkPatchDocuments
BulkOperationResult bulkPatchDocuments(com.mongodb.client.ClientSession cs, String dbName, String collName, org.bson.BsonDocument filter, org.bson.BsonDocument shardKeys, org.bson.BsonDocument data)- Parameters:
cs- the client sessiondbName-collName-filter-shardKeys-data-- Returns:
- the BulkOperationResult
-
bulkDeleteDocuments
BulkOperationResult bulkDeleteDocuments(com.mongodb.client.ClientSession cs, String dbName, String collName, org.bson.BsonDocument filter, org.bson.BsonDocument shardKeys)- Parameters:
cs- the client sessiondbName-collName-filter-shardKeys-- Returns:
- the BulkOperationResult
-
getDocumentEtag
org.bson.BsonDocument getDocumentEtag(com.mongodb.client.ClientSession cs, String dbName, String collName, Object documentId)returns the ETag of the document- Parameters:
cs- the client sessiondbName-collName-documentId-- Returns:
- Document containing _etag property
-