Package org.springframework.data.mongodb
Interface MongoDbFactory
- All Superinterfaces:
CodecRegistryProvider,MongoDatabaseFactory,MongoSessionProvider
Deprecated.
Interface for factories creating
MongoDatabase instances.- Author:
- Mark Pollack, Thomas Darimont, Christoph Strobl
-
Method Summary
Methods inherited from interface org.springframework.data.mongodb.CodecRegistryProvider
getCodecFor, hasCodecForMethods inherited from interface org.springframework.data.mongodb.MongoDatabaseFactory
getCodecRegistry, getExceptionTranslator, getMongoDatabase, getMongoDatabase, getSession, isTransactionActive, withSession, withSession
-
Method Details
-
getDb
Deprecated.since 3.0. UseMongoDatabaseFactory.getMongoDatabase()instead.Creates a defaultMongoDatabaseinstance.- Returns:
- never null.
- Throws:
DataAccessException
-
getDb
@Deprecated default com.mongodb.client.MongoDatabase getDb(String dbName) throws DataAccessException Deprecated.since 3.0. UseMongoDatabaseFactory.getMongoDatabase(String)instead.Obtain aMongoDatabaseinstance to access the database with the given name.- Parameters:
dbName- must not be null or empty.- Returns:
- never null.
- Throws:
DataAccessException
-
MongoDatabaseFactoryinstead.