Uses of Interface
org.springframework.data.mongodb.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
Modifier 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
.Modifier 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.ModifierConstructorDescriptionMongoTransactionManager
(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
Modifier and TypeMethodDescriptionAbstractMongoClientConfiguration.mongoDbFactory()
Creates aSimpleMongoClientDatabaseFactory
to be used by theMongoTemplate
.Modifier 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
Modifier 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.Modifier and TypeMethodDescriptionMongoTemplate.getMongoDatabaseFactory()
MongoDatabaseFactorySupport.withSession
(com.mongodb.client.ClientSession session) ModifierConstructorDescriptionDefaultIndexOperations
(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
ModifierConstructorDescriptionDefaultDbRefResolver
(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
ModifierConstructorDescriptionGridFsTemplate
(MongoDatabaseFactory dbFactory, MongoConverter converter) GridFsTemplate
(MongoDatabaseFactory dbFactory, MongoConverter converter, String bucket)