Package | Description |
---|---|
org.springframework.data.mongodb |
Spring Data's MongoDB abstraction.
|
org.springframework.data.mongodb.config |
Spring XML namespace configuration for MongoDB specific repositories.
|
org.springframework.data.mongodb.core |
MongoDB core support.
|
org.springframework.data.mongodb.core.convert |
Spring Data MongoDB specific converter infrastructure.
|
org.springframework.data.mongodb.gridfs |
Support for MongoDB GridFS feature.
|
Modifier and Type | Interface and Description |
---|---|
interface |
MongoDbFactory
Deprecated.
since 3.0, use
MongoDatabaseFactory instead. |
Modifier and Type | Method and Description |
---|---|
MongoDatabaseFactory |
MongoTransactionManager.getDbFactory()
Get the
MongoDatabaseFactory that this instance manages transactions for. |
MongoDatabaseFactory |
MongoTransactionManager.getResourceFactory() |
MongoDatabaseFactory |
MongoDatabaseFactory.withSession(com.mongodb.client.ClientSession session)
Obtain a
ClientSession bound instance of MongoDatabaseFactory returning MongoDatabase
instances that are aware and bound to the given session. |
default MongoDatabaseFactory |
MongoDatabaseFactory.withSession(com.mongodb.ClientSessionOptions options)
Obtain a
ClientSession bound instance of MongoDatabaseFactory returning MongoDatabase
instances that are aware and bound to a new session with given options . |
Modifier and Type | Method and Description |
---|---|
static com.mongodb.client.MongoDatabase |
MongoDatabaseUtils.getDatabase(MongoDatabaseFactory factory)
|
static com.mongodb.client.MongoDatabase |
MongoDatabaseUtils.getDatabase(MongoDatabaseFactory factory,
SessionSynchronization sessionSynchronization)
Obtain the default
database form the given factory . |
static com.mongodb.client.MongoDatabase |
MongoDatabaseUtils.getDatabase(String dbName,
MongoDatabaseFactory factory)
|
static com.mongodb.client.MongoDatabase |
MongoDatabaseUtils.getDatabase(String dbName,
MongoDatabaseFactory factory,
SessionSynchronization sessionSynchronization)
Obtain the
database with given name form the given factory . |
static boolean |
MongoDatabaseUtils.isTransactionActive(MongoDatabaseFactory dbFactory)
Check if the
MongoDatabaseFactory is actually bound to a ClientSession that has an active
transaction, or if a TransactionSynchronization has been registered for the resource and if the associated ClientSession has an active
transaction . |
void |
MongoTransactionManager.setDbFactory(MongoDatabaseFactory dbFactory)
Set the
MongoDatabaseFactory that this instance should manage transactions for. |
Constructor and Description |
---|
MongoTransactionManager(MongoDatabaseFactory dbFactory)
Create a new
MongoTransactionManager obtaining sessions from the given MongoDatabaseFactory . |
MongoTransactionManager(MongoDatabaseFactory dbFactory,
com.mongodb.TransactionOptions options)
Create a new
MongoTransactionManager obtaining sessions from the given MongoDatabaseFactory
applying the given options , if present, when starting a new transaction. |
Modifier and Type | Method and Description |
---|---|
MongoDatabaseFactory |
AbstractMongoClientConfiguration.mongoDbFactory()
Creates a
SimpleMongoClientDatabaseFactory to be used by the
MongoTemplate . |
Modifier and Type | Method and Description |
---|---|
MappingMongoConverter |
AbstractMongoClientConfiguration.mappingMongoConverter(MongoDatabaseFactory databaseFactory,
MongoCustomConversions customConversions,
MongoMappingContext mappingContext)
Creates a
MappingMongoConverter using the configured AbstractMongoClientConfiguration.mongoDbFactory() and
MongoConfigurationSupport.mongoMappingContext(MongoCustomConversions) . |
MongoTemplate |
AbstractMongoClientConfiguration.mongoTemplate(MongoDatabaseFactory databaseFactory,
MappingMongoConverter converter)
Creates a
MongoTemplate . |
Modifier and Type | Class and Description |
---|---|
class |
MongoDatabaseFactorySupport<C>
Common base class for usage with both
MongoClients defining common properties such as
database name and exception translator. |
class |
MongoDbFactorySupport<C>
Deprecated.
since 3.0, use
MongoDatabaseFactorySupport instead. |
class |
SimpleMongoClientDatabaseFactory
Factory to create
MongoDatabase instances from a MongoClient instance. |
class |
SimpleMongoClientDbFactory
Deprecated.
since 3.0, use
SimpleMongoClientDatabaseFactory instead. |
Modifier and Type | Method and Description |
---|---|
MongoDatabaseFactory |
MongoTemplate.getMongoDatabaseFactory() |
MongoDatabaseFactory |
MongoTemplate.getMongoDbFactory()
Deprecated.
since 3.1.4. Use
MongoTemplate.getMongoDatabaseFactory() instead. |
MongoDatabaseFactory |
MongoDatabaseFactorySupport.withSession(com.mongodb.client.ClientSession session) |
Constructor and Description |
---|
DefaultIndexOperations(MongoDatabaseFactory mongoDbFactory,
String collectionName,
QueryMapper queryMapper)
Deprecated.
since 2.1. Please use
DefaultIndexOperations(MongoOperations, String, Class) . |
DefaultIndexOperations(MongoDatabaseFactory mongoDbFactory,
String collectionName,
QueryMapper queryMapper,
Class<?> type)
Deprecated.
since 2.1. Please use
DefaultIndexOperations(MongoOperations, String, Class) . |
MongoTemplate(MongoDatabaseFactory mongoDbFactory)
Constructor used for a basic template configuration.
|
MongoTemplate(MongoDatabaseFactory mongoDbFactory,
MongoConverter mongoConverter)
Constructor used for a basic template configuration.
|
Modifier and Type | Method and Description |
---|---|
MappingMongoConverter |
MappingMongoConverter.with(MongoDatabaseFactory dbFactory)
|
Constructor and Description |
---|
DefaultDbRefResolver(MongoDatabaseFactory mongoDbFactory)
Creates a new
DefaultDbRefResolver with the given MongoDatabaseFactory . |
MappingMongoConverter(MongoDatabaseFactory mongoDbFactory,
MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
Deprecated.
use the constructor taking a
DbRefResolver instead. |
MongoDatabaseFactoryReferenceLoader(MongoDatabaseFactory mongoDbFactory) |
Constructor and Description |
---|
GridFsTemplate(MongoDatabaseFactory dbFactory,
MongoConverter converter)
|
GridFsTemplate(MongoDatabaseFactory dbFactory,
MongoConverter converter,
String bucket)
|
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.