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.getDbFactory()Get theMongoDatabaseFactorythat this instance manages transactions for.MongoTransactionManager.getResourceFactory()MongoDatabaseFactory.withSession(com.mongodb.client.ClientSession session) Obtain aClientSessionbound instance ofMongoDatabaseFactoryreturningMongoDatabaseinstances that are aware and bound to the given session.default MongoDatabaseFactoryMongoDatabaseFactory.withSession(com.mongodb.ClientSessionOptions options) Obtain aClientSessionbound instance ofMongoDatabaseFactoryreturningMongoDatabaseinstances 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.MongoDatabaseMongoDatabaseUtils.getDatabase(String dbName, MongoDatabaseFactory factory) static com.mongodb.client.MongoDatabaseMongoDatabaseUtils.getDatabase(String dbName, MongoDatabaseFactory factory, SessionSynchronization sessionSynchronization) Obtain thedatabasewith given name form the givenfactory.static com.mongodb.client.MongoDatabaseMongoDatabaseUtils.getDatabase(MongoDatabaseFactory factory) static com.mongodb.client.MongoDatabaseMongoDatabaseUtils.getDatabase(MongoDatabaseFactory factory, SessionSynchronization sessionSynchronization) Obtain the defaultdatabaseform the givenfactory.static booleanMongoDatabaseUtils.isTransactionActive(MongoDatabaseFactory dbFactory) Check if theMongoDatabaseFactoryis actually bound to aClientSessionthat has an active transaction, or if aTransactionSynchronizationhas been registered for theresourceand if the associatedClientSessionhas anactive transaction.voidMongoTransactionManager.setDbFactory(MongoDatabaseFactory dbFactory) Set theMongoDatabaseFactorythat this instance should manage transactions for.Constructors in org.springframework.data.mongodb with parameters of type MongoDatabaseFactoryModifierConstructorDescriptionMongoTransactionManager(MongoDatabaseFactory dbFactory) Create a newMongoTransactionManagerobtaining sessions from the givenMongoDatabaseFactory.MongoTransactionManager(MongoDatabaseFactory dbFactory, com.mongodb.TransactionOptions options) Create a newMongoTransactionManagerobtaining sessions from the givenMongoDatabaseFactoryapplying 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 aSimpleMongoClientDatabaseFactoryto 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) Creates aMappingMongoConverterusing the configuredAbstractMongoClientConfiguration.mongoDbFactory()andMongoConfigurationSupport.mongoMappingContext(MongoCustomConversions).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 TypeClassDescriptionclassCommon base class for usage with bothMongoClientsdefining common properties such as database name and exception translator.classFactory to createMongoDatabaseinstances from aMongoClientinstance.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 newDefaultDbRefResolverwith the givenMongoDatabaseFactory.MappingMongoConverter(MongoDatabaseFactory mongoDbFactory, MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext) Deprecated.use the constructor taking aDbRefResolverinstead.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)