Models a MappingContext for Mongo.
| Fields inherited from class | Fields |
|---|---|
class DocumentMappingContext |
defaultDatabaseName, mappingFactory |
class AbstractMappingContext |
CONFIGURATION_PREFIX, GROOVY_PROXY_FACTORY_NAME, JAVASIST_PROXY_FACTORY, conversionService, entityValidators, eventListeners, persistentEntities, persistentEntitiesByDiscriminator, persistentEntitiesByName, persistentEntitiesByParent, proxyFactory, validatorRegistry |
| Constructor and description |
|---|
MongoMappingContext
(java.lang.String defaultDatabaseName) |
MongoMappingContext
(java.lang.String defaultDatabaseName, groovy.lang.Closure defaultMapping) |
MongoMappingContext
(java.lang.String defaultDatabaseName, groovy.lang.Closure defaultMapping, java.lang.Class... classes)Constructs a new MongoMappingContext for the given arguments |
MongoMappingContext
(org.springframework.core.env.PropertyResolver configuration, java.lang.Class... classes)Constructs a new MongoMappingContext for the given arguments |
MongoMappingContext
(AbstractMongoConnectionSourceSettings settings, java.lang.Class... classes)Construct a new context for the given settings and classes |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected MappingFactory |
createDocumentMappingFactory(groovy.lang.Closure defaultMapping) |
|
PersistentEntity |
createEmbeddedEntity(java.lang.Class type) |
|
org.bson.codecs.configuration.CodecRegistry |
getCodecRegistry()@return The codec registry for this mapping context |
|
static java.lang.String |
getDefaultDatabaseName(org.springframework.core.env.PropertyResolver configuration) |
|
protected void |
initialize(ConnectionSourceSettings settings) |
|
static boolean |
isMongoNativeType(java.lang.Class clazz)Check whether a type is a native mongo type that can be stored by the mongo driver without conversion. |
|
protected void |
registerMongoTypes() |
Constructs a new MongoMappingContext for the given arguments
defaultDatabaseName - The default database namedefaultMapping - The default database mapping configurationclasses - The persistent classesConstructs a new MongoMappingContext for the given arguments
configuration - The configurationclasses - The persistent classesConstruct a new context for the given settings and classes
settings - The settingsclasses - The classes
Check whether a type is a native mongo type that can be stored by the mongo driver without conversion.
clazz - The class to check.