Class DatabaseShardedMongoTemplate
- java.lang.Object
-
- org.springframework.data.mongodb.core.MongoTemplate
-
- com.alpha.mongodb.sharding.core.template.ExtendedMongoTemplate
-
- com.alpha.mongodb.sharding.core.template.ShardedMongoTemplate
-
- com.alpha.mongodb.sharding.core.template.DatabaseShardedMongoTemplate
-
- All Implemented Interfaces:
DatabaseShardingAssistant<ExtendedMongoTemplate>
,ShardingAssistant
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.data.mongodb.core.ExecutableAggregationOperation
,org.springframework.data.mongodb.core.ExecutableFindOperation
,org.springframework.data.mongodb.core.ExecutableInsertOperation
,org.springframework.data.mongodb.core.ExecutableMapReduceOperation
,org.springframework.data.mongodb.core.ExecutableRemoveOperation
,org.springframework.data.mongodb.core.ExecutableUpdateOperation
,org.springframework.data.mongodb.core.FluentMongoOperations
,org.springframework.data.mongodb.core.index.IndexOperationsProvider
,org.springframework.data.mongodb.core.MongoOperations
- Direct Known Subclasses:
CompositeShardedMongoTemplate
public class DatabaseShardedMongoTemplate extends ShardedMongoTemplate implements DatabaseShardingAssistant<ExtendedMongoTemplate>
Database Sharded Reactive Mongo Template. To be used for collections with same names across multiple database shards- Author:
- Shashank Sharma
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.ExecutableAggregationOperation
org.springframework.data.mongodb.core.ExecutableAggregationOperation.AggregationWithAggregation<T extends Object>, org.springframework.data.mongodb.core.ExecutableAggregationOperation.AggregationWithCollection<T extends Object>, org.springframework.data.mongodb.core.ExecutableAggregationOperation.ExecutableAggregation<T extends Object>, org.springframework.data.mongodb.core.ExecutableAggregationOperation.TerminatingAggregation<T extends Object>
-
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.ExecutableFindOperation
org.springframework.data.mongodb.core.ExecutableFindOperation.DistinctWithProjection, org.springframework.data.mongodb.core.ExecutableFindOperation.DistinctWithQuery<T extends Object>, org.springframework.data.mongodb.core.ExecutableFindOperation.ExecutableFind<T extends Object>, org.springframework.data.mongodb.core.ExecutableFindOperation.FindDistinct, org.springframework.data.mongodb.core.ExecutableFindOperation.FindWithCollection<T extends Object>, org.springframework.data.mongodb.core.ExecutableFindOperation.FindWithProjection<T extends Object>, org.springframework.data.mongodb.core.ExecutableFindOperation.FindWithQuery<T extends Object>, org.springframework.data.mongodb.core.ExecutableFindOperation.TerminatingDistinct<T extends Object>, org.springframework.data.mongodb.core.ExecutableFindOperation.TerminatingFind<T extends Object>, org.springframework.data.mongodb.core.ExecutableFindOperation.TerminatingFindNear<T extends Object>
-
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.ExecutableInsertOperation
org.springframework.data.mongodb.core.ExecutableInsertOperation.ExecutableInsert<T extends Object>, org.springframework.data.mongodb.core.ExecutableInsertOperation.InsertWithBulkMode<T extends Object>, org.springframework.data.mongodb.core.ExecutableInsertOperation.InsertWithCollection<T extends Object>, org.springframework.data.mongodb.core.ExecutableInsertOperation.TerminatingBulkInsert<T extends Object>, org.springframework.data.mongodb.core.ExecutableInsertOperation.TerminatingInsert<T extends Object>
-
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.ExecutableMapReduceOperation
org.springframework.data.mongodb.core.ExecutableMapReduceOperation.ExecutableMapReduce<T extends Object>, org.springframework.data.mongodb.core.ExecutableMapReduceOperation.MapReduceWithCollection<T extends Object>, org.springframework.data.mongodb.core.ExecutableMapReduceOperation.MapReduceWithMapFunction<T extends Object>, org.springframework.data.mongodb.core.ExecutableMapReduceOperation.MapReduceWithOptions<T extends Object>, org.springframework.data.mongodb.core.ExecutableMapReduceOperation.MapReduceWithProjection<T extends Object>, org.springframework.data.mongodb.core.ExecutableMapReduceOperation.MapReduceWithQuery<T extends Object>, org.springframework.data.mongodb.core.ExecutableMapReduceOperation.MapReduceWithReduceFunction<T extends Object>, org.springframework.data.mongodb.core.ExecutableMapReduceOperation.TerminatingMapReduce<T extends Object>
-
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.ExecutableRemoveOperation
org.springframework.data.mongodb.core.ExecutableRemoveOperation.ExecutableRemove<T extends Object>, org.springframework.data.mongodb.core.ExecutableRemoveOperation.RemoveWithCollection<T extends Object>, org.springframework.data.mongodb.core.ExecutableRemoveOperation.RemoveWithQuery<T extends Object>, org.springframework.data.mongodb.core.ExecutableRemoveOperation.TerminatingRemove<T extends Object>
-
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.ExecutableUpdateOperation
org.springframework.data.mongodb.core.ExecutableUpdateOperation.ExecutableUpdate<T extends Object>, org.springframework.data.mongodb.core.ExecutableUpdateOperation.FindAndModifyWithOptions<T extends Object>, org.springframework.data.mongodb.core.ExecutableUpdateOperation.FindAndReplaceWithOptions<T extends Object>, org.springframework.data.mongodb.core.ExecutableUpdateOperation.FindAndReplaceWithProjection<T extends Object>, org.springframework.data.mongodb.core.ExecutableUpdateOperation.TerminatingFindAndModify<T extends Object>, org.springframework.data.mongodb.core.ExecutableUpdateOperation.TerminatingFindAndReplace<T extends Object>, org.springframework.data.mongodb.core.ExecutableUpdateOperation.TerminatingUpdate<T extends Object>, org.springframework.data.mongodb.core.ExecutableUpdateOperation.UpdateWithCollection<T extends Object>, org.springframework.data.mongodb.core.ExecutableUpdateOperation.UpdateWithQuery<T extends Object>, org.springframework.data.mongodb.core.ExecutableUpdateOperation.UpdateWithUpdate<T extends Object>
-
-
Constructor Summary
Constructors Constructor Description DatabaseShardedMongoTemplate(com.mongodb.client.MongoClient delegatedMongoClient, String databaseName, DatabaseShardingOptions shardingOptions)
DatabaseShardedMongoTemplate(Map<String,com.mongodb.client.MongoClient> delegatedMongoClientMap, String databaseName, DatabaseShardingOptions shardingOptions)
DatabaseShardedMongoTemplate(Map<String,org.springframework.data.mongodb.MongoDatabaseFactory> delegatedDatabaseFactory, DatabaseShardingOptions shardingOptions)
DatabaseShardedMongoTemplate(Map<String,org.springframework.data.mongodb.MongoDatabaseFactory> delegatedDatabaseFactory, org.springframework.data.mongodb.core.convert.MongoConverter mongoConverter, DatabaseShardingOptions shardingOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> List<T>
find(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass)
<T> List<T>
find(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass, String collectionName)
<T> List<T>
findAll(Class<T> entityClass)
<T> List<T>
findAll(Class<T> entityClass, String collectionName)
<T> List<T>
findAllAndRemove(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass)
<T> List<T>
findAllAndRemove(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass, String collectionName)
<T> List<T>
findAllAndRemove(org.springframework.data.mongodb.core.query.Query query, String collectionName)
<T> T
findAndModify(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<T> entityClass)
<T> T
findAndModify(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<T> entityClass, String collectionName)
<T> T
findAndModify(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, org.springframework.data.mongodb.core.FindAndModifyOptions options, Class<T> entityClass)
<T> T
findAndModify(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, org.springframework.data.mongodb.core.FindAndModifyOptions options, Class<T> entityClass, String collectionName)
<T> T
findAndRemove(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass)
<T> T
findAndRemove(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass, String collectionName)
<S,T>
TfindAndReplace(org.springframework.data.mongodb.core.query.Query query, S replacement, org.springframework.data.mongodb.core.FindAndReplaceOptions options, Class<S> entityType, Class<T> resultType)
<S,T>
TfindAndReplace(org.springframework.data.mongodb.core.query.Query query, S replacement, org.springframework.data.mongodb.core.FindAndReplaceOptions options, Class<S> entityType, String collectionName, Class<T> resultType)
<T> T
findAndReplace(org.springframework.data.mongodb.core.query.Query query, T replacement)
<T> T
findAndReplace(org.springframework.data.mongodb.core.query.Query query, T replacement, String collectionName)
<T> T
findAndReplace(org.springframework.data.mongodb.core.query.Query query, T replacement, org.springframework.data.mongodb.core.FindAndReplaceOptions options)
<T> T
findAndReplace(org.springframework.data.mongodb.core.query.Query query, T replacement, org.springframework.data.mongodb.core.FindAndReplaceOptions options, Class<T> entityType, String collectionName)
<T> T
findAndReplace(org.springframework.data.mongodb.core.query.Query query, T replacement, org.springframework.data.mongodb.core.FindAndReplaceOptions options, String collectionName)
<T> T
findById(Object id, Class<T> entityClass)
<T> T
findById(Object id, Class<T> entityClass, String collectionName)
<T> List<T>
findDistinct(String field, Class<?> entityClass, Class<T> resultClass)
<T> List<T>
findDistinct(org.springframework.data.mongodb.core.query.Query query, String field, Class<?> entityClass, Class<T> resultClass)
<T> List<T>
findDistinct(org.springframework.data.mongodb.core.query.Query query, String field, String collectionName, Class<?> entityClass, Class<T> resultClass)
<T> List<T>
findDistinct(org.springframework.data.mongodb.core.query.Query query, String field, String collection, Class<T> resultClass)
<T> T
findOne(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass)
<T> T
findOne(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass, String collectionName)
<T> org.springframework.data.mongodb.core.ExecutableInsertOperation.ExecutableInsert<T>
insert(Class<T> domainType)
<T> Collection<T>
insert(Collection<? extends T> batchToSave, Class<?> entityClass)
<T> Collection<T>
insert(Collection<? extends T> batchToSave, String collectionName)
<T> T
insert(T objectToSave)
<T> T
insert(T objectToSave, String collectionName)
<T> Collection<T>
insertAll(Collection<? extends T> objectsToSave)
<T> org.springframework.data.mongodb.core.ExecutableFindOperation.ExecutableFind<T>
query(Class<T> domainType)
<T> org.springframework.data.mongodb.core.ExecutableRemoveOperation.ExecutableRemove<T>
remove(Class<T> domainType)
com.mongodb.client.result.DeleteResult
remove(Object object)
com.mongodb.client.result.DeleteResult
remove(Object object, String collectionName)
com.mongodb.client.result.DeleteResult
remove(org.springframework.data.mongodb.core.query.Query query, Class<?> entityClass)
com.mongodb.client.result.DeleteResult
remove(org.springframework.data.mongodb.core.query.Query query, Class<?> entityClass, String collectionName)
com.mongodb.client.result.DeleteResult
remove(org.springframework.data.mongodb.core.query.Query query, String collectionName)
<T> T
save(T objectToSave)
<T> T
save(T objectToSave, String collectionName)
<T> org.springframework.data.util.CloseableIterator<T>
stream(org.springframework.data.mongodb.core.query.Query query, Class<T> entityType)
<T> org.springframework.data.util.CloseableIterator<T>
stream(org.springframework.data.mongodb.core.query.Query query, Class<T> entityType, String collectionName)
<T> org.springframework.data.mongodb.core.ExecutableUpdateOperation.ExecutableUpdate<T>
update(Class<T> domainType)
com.mongodb.client.result.UpdateResult
updateFirst(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass)
com.mongodb.client.result.UpdateResult
updateFirst(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass, String collectionName)
com.mongodb.client.result.UpdateResult
updateFirst(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, String collectionName)
com.mongodb.client.result.UpdateResult
updateMulti(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass)
com.mongodb.client.result.UpdateResult
updateMulti(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass, String collectionName)
com.mongodb.client.result.UpdateResult
updateMulti(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, String collectionName)
com.mongodb.client.result.UpdateResult
upsert(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass)
com.mongodb.client.result.UpdateResult
upsert(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass, String collectionName)
com.mongodb.client.result.UpdateResult
upsert(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, String collectionName)
-
Methods inherited from class com.alpha.mongodb.sharding.core.template.ShardedMongoTemplate
setApplicationContext
-
Methods inherited from class com.alpha.mongodb.sharding.core.template.ExtendedMongoTemplate
removeOne
-
Methods inherited from class org.springframework.data.mongodb.core.MongoTemplate
aggregate, aggregate, aggregate, aggregate, aggregate, aggregateAndReturn, aggregateStream, aggregateStream, aggregateStream, aggregateStream, aggregateStream, bulkOps, bulkOps, bulkOps, collectionExists, collectionExists, convertToDocument, convertToDocument, count, count, count, countCanBeEstimated, createCollection, createCollection, createCollection, createCollection, doAggregate, doCount, doCreateCollection, doCreateCollection, doEstimatedCount, doExactCount, doFind, doFind, doFind, doFindAndDelete, doFindAndModify, doFindAndRemove, doFindAndReplace, doFindOne, doFindOne, doGetDatabase, doInsert, doInsertAll, doInsertBatch, doRemove, doSave, doStream, doUpdate, dropCollection, dropCollection, ensureNotCollectionLike, ensureNotIterable, estimatedCount, exactCount, execute, execute, execute, executeCommand, executeCommand, executeCommand, executeQuery, executeQuery, exists, exists, exists, geoNear, geoNear, geoNear, getCollection, getCollectionName, getCollectionNames, getConverter, getDb, getExceptionTranslator, getMongoDatabaseFactory, getMongoDbFactory, group, group, indexOps, indexOps, indexOps, insertDocument, insertDocumentList, mapReduce, mapReduce, mapReduce, mapReduce, mapReduce, mapReduce, maybeCallAfterConvert, maybeCallAfterSave, maybeCallBeforeConvert, maybeCallBeforeSave, maybeEmitEvent, populateIdIfNecessary, prepareCollection, prepareDatabase, prepareWriteConcern, replaceWithResourceIfNecessary, saveDocument, scriptOps, setEntityCallbacks, setReadPreference, setSessionSynchronization, setWriteConcern, setWriteConcernResolver, setWriteResultChecking, useEstimatedCount, withSession, withSession
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.alpha.mongodb.sharding.core.assitant.DatabaseShardingAssistant
getDelegatedShardedMongoTemplateMap, getDelegatedTemplateForDeleteContext, getDelegatedTemplateForDeleteContext, getDelegatedTemplateForDeleteContext, getDelegatedTemplateForFindContext, getDelegatedTemplateForFindContext, getDelegatedTemplateForSaveContext, getDelegatedTemplateForUpdateContext, getDelegatedTemplateForUpdateContext, getDelegatedTemplateWithEntityContext, getDelegatedTemplateWithoutEntityContext, resolveDatabaseHintWithEntityContext
-
Methods inherited from interface org.springframework.data.mongodb.core.MongoOperations
estimatedCount, exactCount, exactCount, withSession
-
Methods inherited from interface com.alpha.mongodb.sharding.core.assitant.ShardingAssistant
getHintResolutionCallbacks, getShardingOptions, resolveCollectionHintWithoutEntityContext, resolveCollectionNameWithoutEntityContext, resolveDatabaseHintWithoutEntityContext, resolveDatabaseNameWithoutEntityContext
-
-
-
-
Constructor Detail
-
DatabaseShardedMongoTemplate
public DatabaseShardedMongoTemplate(Map<String,com.mongodb.client.MongoClient> delegatedMongoClientMap, String databaseName, DatabaseShardingOptions shardingOptions)
-
DatabaseShardedMongoTemplate
public DatabaseShardedMongoTemplate(com.mongodb.client.MongoClient delegatedMongoClient, String databaseName, DatabaseShardingOptions shardingOptions)
-
DatabaseShardedMongoTemplate
public DatabaseShardedMongoTemplate(Map<String,org.springframework.data.mongodb.MongoDatabaseFactory> delegatedDatabaseFactory, DatabaseShardingOptions shardingOptions)
-
DatabaseShardedMongoTemplate
public DatabaseShardedMongoTemplate(Map<String,org.springframework.data.mongodb.MongoDatabaseFactory> delegatedDatabaseFactory, org.springframework.data.mongodb.core.convert.MongoConverter mongoConverter, DatabaseShardingOptions shardingOptions)
-
-
Method Detail
-
find
public <T> List<T> find(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass)
- Specified by:
find
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
find
in classorg.springframework.data.mongodb.core.MongoTemplate
-
find
public <T> List<T> find(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass, String collectionName)
- Specified by:
find
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
find
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAll
public <T> List<T> findAll(Class<T> entityClass)
- Specified by:
findAll
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAll
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAll
public <T> List<T> findAll(Class<T> entityClass, String collectionName)
- Specified by:
findAll
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAll
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAllAndRemove
public <T> List<T> findAllAndRemove(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass)
- Specified by:
findAllAndRemove
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAllAndRemove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAllAndRemove
public <T> List<T> findAllAndRemove(org.springframework.data.mongodb.core.query.Query query, String collectionName)
- Specified by:
findAllAndRemove
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAllAndRemove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAllAndRemove
public <T> List<T> findAllAndRemove(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass, String collectionName)
- Specified by:
findAllAndRemove
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAllAndRemove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAndModify
public <T> T findAndModify(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<T> entityClass)
- Specified by:
findAndModify
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAndModify
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAndModify
public <T> T findAndModify(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<T> entityClass, String collectionName)
- Specified by:
findAndModify
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAndModify
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAndModify
public <T> T findAndModify(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, org.springframework.data.mongodb.core.FindAndModifyOptions options, Class<T> entityClass)
- Specified by:
findAndModify
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAndModify
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAndModify
public <T> T findAndModify(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, org.springframework.data.mongodb.core.FindAndModifyOptions options, Class<T> entityClass, String collectionName)
- Specified by:
findAndModify
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAndModify
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAndRemove
public <T> T findAndRemove(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass)
- Specified by:
findAndRemove
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAndRemove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAndRemove
public <T> T findAndRemove(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass, String collectionName)
- Specified by:
findAndRemove
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAndRemove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findAndReplace
public <T> T findAndReplace(org.springframework.data.mongodb.core.query.Query query, T replacement)
- Specified by:
findAndReplace
in interfaceorg.springframework.data.mongodb.core.MongoOperations
-
findAndReplace
public <T> T findAndReplace(org.springframework.data.mongodb.core.query.Query query, T replacement, String collectionName)
- Specified by:
findAndReplace
in interfaceorg.springframework.data.mongodb.core.MongoOperations
-
findAndReplace
public <T> T findAndReplace(org.springframework.data.mongodb.core.query.Query query, T replacement, org.springframework.data.mongodb.core.FindAndReplaceOptions options)
- Specified by:
findAndReplace
in interfaceorg.springframework.data.mongodb.core.MongoOperations
-
findAndReplace
public <T> T findAndReplace(org.springframework.data.mongodb.core.query.Query query, T replacement, org.springframework.data.mongodb.core.FindAndReplaceOptions options, String collectionName)
- Specified by:
findAndReplace
in interfaceorg.springframework.data.mongodb.core.MongoOperations
-
findAndReplace
public <S,T> T findAndReplace(org.springframework.data.mongodb.core.query.Query query, S replacement, org.springframework.data.mongodb.core.FindAndReplaceOptions options, Class<S> entityType, Class<T> resultType)
- Specified by:
findAndReplace
in interfaceorg.springframework.data.mongodb.core.MongoOperations
-
findAndReplace
public <T> T findAndReplace(org.springframework.data.mongodb.core.query.Query query, T replacement, org.springframework.data.mongodb.core.FindAndReplaceOptions options, Class<T> entityType, String collectionName)
- Specified by:
findAndReplace
in interfaceorg.springframework.data.mongodb.core.MongoOperations
-
findAndReplace
public <S,T> T findAndReplace(org.springframework.data.mongodb.core.query.Query query, S replacement, org.springframework.data.mongodb.core.FindAndReplaceOptions options, Class<S> entityType, String collectionName, Class<T> resultType)
- Specified by:
findAndReplace
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findAndReplace
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findOne
public <T> T findOne(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass)
- Specified by:
findOne
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findOne
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findOne
public <T> T findOne(org.springframework.data.mongodb.core.query.Query query, Class<T> entityClass, String collectionName)
- Specified by:
findOne
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findOne
in classorg.springframework.data.mongodb.core.MongoTemplate
-
insert
public <T> T insert(T objectToSave)
- Specified by:
insert
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
insert
in classorg.springframework.data.mongodb.core.MongoTemplate
-
insert
public <T> T insert(T objectToSave, String collectionName)
- Specified by:
insert
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
insert
in classorg.springframework.data.mongodb.core.MongoTemplate
-
insert
public <T> Collection<T> insert(Collection<? extends T> batchToSave, Class<?> entityClass)
- Specified by:
insert
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
insert
in classorg.springframework.data.mongodb.core.MongoTemplate
-
insert
public <T> Collection<T> insert(Collection<? extends T> batchToSave, String collectionName)
- Specified by:
insert
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
insert
in classorg.springframework.data.mongodb.core.MongoTemplate
-
insertAll
public <T> Collection<T> insertAll(Collection<? extends T> objectsToSave)
- Specified by:
insertAll
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
insertAll
in classorg.springframework.data.mongodb.core.MongoTemplate
-
updateFirst
public com.mongodb.client.result.UpdateResult updateFirst(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass)
- Specified by:
updateFirst
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
updateFirst
in classorg.springframework.data.mongodb.core.MongoTemplate
-
updateFirst
public com.mongodb.client.result.UpdateResult updateFirst(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, String collectionName)
- Specified by:
updateFirst
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
updateFirst
in classorg.springframework.data.mongodb.core.MongoTemplate
-
updateFirst
public com.mongodb.client.result.UpdateResult updateFirst(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass, String collectionName)
- Specified by:
updateFirst
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
updateFirst
in classorg.springframework.data.mongodb.core.MongoTemplate
-
updateMulti
public com.mongodb.client.result.UpdateResult updateMulti(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass)
- Specified by:
updateMulti
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
updateMulti
in classorg.springframework.data.mongodb.core.MongoTemplate
-
updateMulti
public com.mongodb.client.result.UpdateResult updateMulti(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, String collectionName)
- Specified by:
updateMulti
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
updateMulti
in classorg.springframework.data.mongodb.core.MongoTemplate
-
updateMulti
public com.mongodb.client.result.UpdateResult updateMulti(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass, String collectionName)
- Specified by:
updateMulti
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
updateMulti
in classorg.springframework.data.mongodb.core.MongoTemplate
-
upsert
public com.mongodb.client.result.UpdateResult upsert(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass)
- Specified by:
upsert
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
upsert
in classorg.springframework.data.mongodb.core.MongoTemplate
-
upsert
public com.mongodb.client.result.UpdateResult upsert(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, String collectionName)
- Specified by:
upsert
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
upsert
in classorg.springframework.data.mongodb.core.MongoTemplate
-
upsert
public com.mongodb.client.result.UpdateResult upsert(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.mongodb.core.query.UpdateDefinition update, Class<?> entityClass, String collectionName)
- Specified by:
upsert
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
upsert
in classorg.springframework.data.mongodb.core.MongoTemplate
-
remove
public com.mongodb.client.result.DeleteResult remove(Object object)
- Specified by:
remove
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
remove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
remove
public com.mongodb.client.result.DeleteResult remove(Object object, String collectionName)
- Specified by:
remove
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
remove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
remove
public com.mongodb.client.result.DeleteResult remove(org.springframework.data.mongodb.core.query.Query query, Class<?> entityClass)
- Specified by:
remove
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
remove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
remove
public com.mongodb.client.result.DeleteResult remove(org.springframework.data.mongodb.core.query.Query query, String collectionName)
- Specified by:
remove
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
remove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
remove
public com.mongodb.client.result.DeleteResult remove(org.springframework.data.mongodb.core.query.Query query, Class<?> entityClass, String collectionName)
- Specified by:
remove
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
remove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
save
public <T> T save(T objectToSave)
- Specified by:
save
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
save
in classorg.springframework.data.mongodb.core.MongoTemplate
-
save
public <T> T save(T objectToSave, String collectionName)
- Specified by:
save
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
save
in classorg.springframework.data.mongodb.core.MongoTemplate
-
stream
public <T> org.springframework.data.util.CloseableIterator<T> stream(org.springframework.data.mongodb.core.query.Query query, Class<T> entityType)
- Specified by:
stream
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
stream
in classorg.springframework.data.mongodb.core.MongoTemplate
-
stream
public <T> org.springframework.data.util.CloseableIterator<T> stream(org.springframework.data.mongodb.core.query.Query query, Class<T> entityType, String collectionName)
- Specified by:
stream
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
stream
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findById
public <T> T findById(Object id, Class<T> entityClass)
- Specified by:
findById
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findById
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findById
public <T> T findById(Object id, Class<T> entityClass, String collectionName)
- Specified by:
findById
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findById
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findDistinct
public <T> List<T> findDistinct(String field, Class<?> entityClass, Class<T> resultClass)
- Specified by:
findDistinct
in interfaceorg.springframework.data.mongodb.core.MongoOperations
-
findDistinct
public <T> List<T> findDistinct(org.springframework.data.mongodb.core.query.Query query, String field, Class<?> entityClass, Class<T> resultClass)
- Specified by:
findDistinct
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findDistinct
in classorg.springframework.data.mongodb.core.MongoTemplate
-
findDistinct
public <T> List<T> findDistinct(org.springframework.data.mongodb.core.query.Query query, String field, String collection, Class<T> resultClass)
- Specified by:
findDistinct
in interfaceorg.springframework.data.mongodb.core.MongoOperations
-
findDistinct
public <T> List<T> findDistinct(org.springframework.data.mongodb.core.query.Query query, String field, String collectionName, Class<?> entityClass, Class<T> resultClass)
- Specified by:
findDistinct
in interfaceorg.springframework.data.mongodb.core.MongoOperations
- Overrides:
findDistinct
in classorg.springframework.data.mongodb.core.MongoTemplate
-
query
public <T> org.springframework.data.mongodb.core.ExecutableFindOperation.ExecutableFind<T> query(Class<T> domainType)
- Specified by:
query
in interfaceorg.springframework.data.mongodb.core.ExecutableFindOperation
- Overrides:
query
in classorg.springframework.data.mongodb.core.MongoTemplate
-
remove
public <T> org.springframework.data.mongodb.core.ExecutableRemoveOperation.ExecutableRemove<T> remove(Class<T> domainType)
- Specified by:
remove
in interfaceorg.springframework.data.mongodb.core.ExecutableRemoveOperation
- Overrides:
remove
in classorg.springframework.data.mongodb.core.MongoTemplate
-
update
public <T> org.springframework.data.mongodb.core.ExecutableUpdateOperation.ExecutableUpdate<T> update(Class<T> domainType)
- Specified by:
update
in interfaceorg.springframework.data.mongodb.core.ExecutableUpdateOperation
- Overrides:
update
in classorg.springframework.data.mongodb.core.MongoTemplate
-
insert
public <T> org.springframework.data.mongodb.core.ExecutableInsertOperation.ExecutableInsert<T> insert(Class<T> domainType)
- Specified by:
insert
in interfaceorg.springframework.data.mongodb.core.ExecutableInsertOperation
- Overrides:
insert
in classorg.springframework.data.mongodb.core.MongoTemplate
-
-