Uses of Interface
org.springframework.data.mongodb.MongoDatabaseFactory
Packages that use MongoDatabaseFactory
Package
Description
Spring Data's MongoDB abstraction.
Spring XML namespace configuration for MongoDB specific repositories.
MongoDB core support.
Spring Data MongoDB specific converter infrastructure.
Support for MongoDB GridFS feature.
-
Uses of MongoDatabaseFactory in org.springframework.data.mongodb
Methods in org.springframework.data.mongodb that return MongoDatabaseFactoryModifier and TypeMethodDescriptionMongoTransactionManager.getDatabaseFactory()
Get theMongoDatabaseFactory
that this instance manages transactions for.MongoTransactionManager.getResourceFactory()
MongoDatabaseFactory.withSession
(com.mongodb.client.ClientSession session) Obtain aClientSession
bound instance ofMongoDatabaseFactory
returningMongoDatabase
instances that are aware and bound to the given session.default MongoDatabaseFactory
MongoDatabaseFactory.withSession
(com.mongodb.ClientSessionOptions options) Obtain aClientSession
bound instance ofMongoDatabaseFactory
returningMongoDatabase
instances that are aware and bound to a new session with givenoptions
.Methods in org.springframework.data.mongodb with parameters of type MongoDatabaseFactoryModifier and TypeMethodDescriptionstatic com.mongodb.client.MongoDatabase
MongoDatabaseUtils.getDatabase
(String dbName, MongoDatabaseFactory factory) static com.mongodb.client.MongoDatabase
MongoDatabaseUtils.getDatabase
(String dbName, MongoDatabaseFactory factory, SessionSynchronization sessionSynchronization) Obtain thedatabase
with given name form the givenfactory
.static com.mongodb.client.MongoDatabase
MongoDatabaseUtils.getDatabase
(MongoDatabaseFactory factory) static com.mongodb.client.MongoDatabase
MongoDatabaseUtils.getDatabase
(MongoDatabaseFactory factory, SessionSynchronization sessionSynchronization) Obtain the defaultdatabase
form the givenfactory
.static boolean
MongoDatabaseUtils.isTransactionActive
(MongoDatabaseFactory dbFactory) Check if theMongoDatabaseFactory
is actually bound to aClientSession
that has an active transaction, or if aTransactionSynchronization
has been registered for theresource
and if the associatedClientSession
has anactive transaction
.void
MongoTransactionManager.setDatabaseFactory
(MongoDatabaseFactory databaseFactory) Set theMongoDatabaseFactory
that this instance should manage transactions for.Constructors in org.springframework.data.mongodb with parameters of type MongoDatabaseFactoryModifierConstructorDescriptionMongoTransactionManager
(MongoDatabaseFactory databaseFactory) Create a newMongoTransactionManager
obtaining sessions from the givenMongoDatabaseFactory
.MongoTransactionManager
(MongoDatabaseFactory databaseFactory, com.mongodb.TransactionOptions options) Create a newMongoTransactionManager
obtaining sessions from the givenMongoDatabaseFactory
applying the givenoptions
, if present, when starting a new transaction.MongoTransactionManager
(MongoDatabaseFactory databaseFactory, MongoTransactionOptionsResolver transactionOptionsResolver, MongoTransactionOptions defaultTransactionOptions) Create a newMongoTransactionManager
obtaining sessions from the givenMongoDatabaseFactory
applying the givenoptions
, if present, when starting a new transaction. -
Uses of MongoDatabaseFactory in org.springframework.data.mongodb.config
Methods in org.springframework.data.mongodb.config that return MongoDatabaseFactoryModifier and TypeMethodDescriptionAbstractMongoClientConfiguration.mongoDbFactory()
Creates aSimpleMongoClientDatabaseFactory
to be used by theMongoTemplate
.Methods in org.springframework.data.mongodb.config with parameters of type MongoDatabaseFactoryModifier and TypeMethodDescriptionAbstractMongoClientConfiguration.mappingMongoConverter
(MongoDatabaseFactory databaseFactory, MongoCustomConversions customConversions, MongoMappingContext mappingContext) AbstractMongoClientConfiguration.mongoTemplate
(MongoDatabaseFactory databaseFactory, MappingMongoConverter converter) Creates aMongoTemplate
. -
Uses of MongoDatabaseFactory in org.springframework.data.mongodb.core
Classes in org.springframework.data.mongodb.core that implement MongoDatabaseFactoryModifier and TypeClassDescriptionclass
Common base class for usage with bothMongoClients
defining common properties such as database name and exception translator.class
Factory to createMongoDatabase
instances from aMongoClient
instance.Methods in org.springframework.data.mongodb.core that return MongoDatabaseFactoryModifier and TypeMethodDescriptionMongoTemplate.getMongoDatabaseFactory()
MongoDatabaseFactorySupport.withSession
(com.mongodb.client.ClientSession session) Constructors in org.springframework.data.mongodb.core with parameters of type MongoDatabaseFactoryModifierConstructorDescriptionDefaultIndexOperations
(MongoDatabaseFactory mongoDbFactory, String collectionName, QueryMapper queryMapper) Deprecated.since 2.1.DefaultIndexOperations
(MongoDatabaseFactory mongoDbFactory, String collectionName, QueryMapper queryMapper, Class<?> type) Deprecated.since 2.1.MongoTemplate
(MongoDatabaseFactory mongoDbFactory) Constructor used for a basic template configuration.MongoTemplate
(MongoDatabaseFactory mongoDbFactory, MongoConverter mongoConverter) Constructor used for a basic template configuration. -
Uses of MongoDatabaseFactory in org.springframework.data.mongodb.core.convert
Methods in org.springframework.data.mongodb.core.convert with parameters of type MongoDatabaseFactoryConstructors in org.springframework.data.mongodb.core.convert with parameters of type MongoDatabaseFactoryModifierConstructorDescriptionDefaultDbRefResolver
(MongoDatabaseFactory mongoDbFactory) Creates a newDefaultDbRefResolver
with the givenMongoDatabaseFactory
.MappingMongoConverter
(MongoDatabaseFactory mongoDbFactory, MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext) Deprecated.use the constructor taking aDbRefResolver
instead.MongoDatabaseFactoryReferenceLoader
(MongoDatabaseFactory mongoDbFactory) -
Uses of MongoDatabaseFactory in org.springframework.data.mongodb.gridfs
Constructors in org.springframework.data.mongodb.gridfs with parameters of type MongoDatabaseFactoryModifierConstructorDescriptionGridFsTemplate
(MongoDatabaseFactory dbFactory, MongoConverter converter) GridFsTemplate
(MongoDatabaseFactory dbFactory, MongoConverter converter, String bucket)