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, hasCodecFor
Methods 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 defaultMongoDatabase
instance.- 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 aMongoDatabase
instance to access the database with the given name.- Parameters:
dbName
- must not be null or empty.- Returns:
- never null.
- Throws:
DataAccessException
-
MongoDatabaseFactory
instead.