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 | Method and Description |
---|---|
MongoDbFactory |
MongoTransactionManager.getDbFactory()
Get the
MongoDbFactory that this instance manages transactions for. |
MongoDbFactory |
MongoTransactionManager.getResourceFactory() |
MongoDbFactory |
MongoDbFactory.withSession(com.mongodb.client.ClientSession session)
Obtain a
ClientSession bound instance of MongoDbFactory returning MongoDatabase instances
that are aware and bound to the given session. |
default MongoDbFactory |
MongoDbFactory.withSession(com.mongodb.ClientSessionOptions options)
Obtain a
ClientSession bound instance of MongoDbFactory 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(MongoDbFactory factory)
|
static com.mongodb.client.MongoDatabase |
MongoDatabaseUtils.getDatabase(MongoDbFactory factory,
SessionSynchronization sessionSynchronization)
Obtain the default
database form the given factory . |
static com.mongodb.client.MongoDatabase |
MongoDatabaseUtils.getDatabase(String dbName,
MongoDbFactory factory)
|
static com.mongodb.client.MongoDatabase |
MongoDatabaseUtils.getDatabase(String dbName,
MongoDbFactory factory,
SessionSynchronization sessionSynchronization)
Obtain the
database with given name form the given factory . |
static boolean |
MongoDatabaseUtils.isTransactionActive(MongoDbFactory dbFactory)
Check if the
MongoDbFactory 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(MongoDbFactory dbFactory)
Set the
MongoDbFactory that this instance should manage transactions for. |
Constructor and Description |
---|
MongoTransactionManager(MongoDbFactory dbFactory)
Create a new
MongoTransactionManager obtaining sessions from the given MongoDbFactory . |
MongoTransactionManager(MongoDbFactory dbFactory,
com.mongodb.TransactionOptions options)
Create a new
MongoTransactionManager obtaining sessions from the given MongoDbFactory applying the
given options , if present, when starting a new transaction. |
Modifier and Type | Method and Description |
---|---|
MongoDbFactory |
AbstractMongoClientConfiguration.mongoDbFactory()
Creates a
SimpleMongoDbFactory to be used by the MongoTemplate . |
MongoDbFactory |
AbstractMongoConfiguration.mongoDbFactory()
Deprecated.
Creates a
SimpleMongoDbFactory to be used by the MongoTemplate . |
Modifier and Type | Class and Description |
---|---|
class |
MongoDbFactorySupport<C>
Common base class for usage with both
MongoClients and MongoClient
defining common properties such as database name and exception translator. |
class |
SimpleMongoClientDbFactory
Factory to create
MongoDatabase instances from a MongoClient instance. |
class |
SimpleMongoDbFactory
Deprecated.
since 2.2 in favor of
SimpleMongoClientDbFactory . |
Modifier and Type | Method and Description |
---|---|
MongoDbFactory |
MongoTemplate.getMongoDbFactory() |
MongoDbFactory |
MongoDbFactorySupport.withSession(com.mongodb.client.ClientSession session) |
Constructor and Description |
---|
DefaultIndexOperations(MongoDbFactory mongoDbFactory,
String collectionName,
QueryMapper queryMapper)
Deprecated.
since 2.1. Please use
DefaultIndexOperations(MongoOperations, String, Class) . |
DefaultIndexOperations(MongoDbFactory mongoDbFactory,
String collectionName,
QueryMapper queryMapper,
Class<?> type)
Deprecated.
since 2.1. Please use
DefaultIndexOperations(MongoOperations, String, Class) . |
MongoTemplate(MongoDbFactory mongoDbFactory)
Constructor used for a basic template configuration.
|
MongoTemplate(MongoDbFactory mongoDbFactory,
MongoConverter mongoConverter)
Constructor used for a basic template configuration.
|
Modifier and Type | Method and Description |
---|---|
MappingMongoConverter |
MappingMongoConverter.with(MongoDbFactory dbFactory)
|
Constructor and Description |
---|
DefaultDbRefResolver(MongoDbFactory mongoDbFactory)
Creates a new
DefaultDbRefResolver with the given MongoDbFactory . |
MappingMongoConverter(MongoDbFactory mongoDbFactory,
MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
Deprecated.
use the constructor taking a
DbRefResolver instead. |
Constructor and Description |
---|
GridFsTemplate(MongoDbFactory dbFactory,
MongoConverter converter)
|
GridFsTemplate(MongoDbFactory dbFactory,
MongoConverter converter,
String bucket)
|
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.