@java.lang.SuppressWarnings("rawtypes") public class MongoMappingContext extends DocumentMappingContext
Models a MappingContext for Mongo.
Modifiers | Name | Description |
---|---|---|
class |
MongoMappingContext.DocumentEmbeddedPersistentEntity |
|
private class |
MongoMappingContext.MongoDocumentMappingFactory |
Modifiers | Name | Description |
---|---|---|
private static java.lang.String |
DECIMAL_TYPE_CLASS_NAME |
|
private static java.util.Set<java.lang.String> |
MONGO_NATIVE_TYPES |
Java types supported as mongo property types. |
private org.bson.codecs.configuration.CodecRegistry |
codecRegistry |
|
private java.util.Map<java.lang.Class, java.lang.Boolean> |
hasCodecCache |
Fields inherited from class | Fields |
---|---|
class DocumentMappingContext |
defaultDatabaseName, defaultMapping, mappingFactory, syntaxStrategy |
class AbstractMappingContext |
CONFIGURATION_PREFIX, GROOVY_PROXY_FACTORY_NAME, JAVASIST_PROXY_FACTORY, canInitializeEntities, conversionService, entityValidators, eventListeners, initialized, multiTenancyMode, 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 |
---|---|---|
|
public org.bson.types.ObjectId |
convert(java.lang.String source) |
|
public java.lang.String |
convert(org.bson.types.ObjectId source) |
|
public org.bson.types.Binary |
convert(byte[] source) |
|
public byte[] |
convert(org.bson.types.Binary source) |
|
public BigDecimal |
convert(org.bson.types.Decimal128 source) |
|
public org.bson.types.Decimal128 |
convert(BigDecimal source) |
|
public BigInteger |
convert(org.bson.types.Decimal128 source) |
|
public org.bson.types.Decimal128 |
convert(BigInteger source) |
|
protected MappingFactory |
createDocumentMappingFactory(groovy.lang.Closure defaultMapping) |
|
public PersistentEntity |
createEmbeddedEntity(java.lang.Class type) |
|
public org.bson.codecs.configuration.CodecRegistry |
getCodecRegistry()
|
|
public static java.lang.String |
getDefaultDatabaseName(org.springframework.core.env.PropertyResolver configuration) |
|
private boolean |
hasCodecForType(java.lang.Class propType) |
|
protected void |
initialize(ConnectionSourceSettings settings) |
|
private void |
initialize(java.lang.Class[] classes) |
|
public 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() |
Java types supported as mongo property types.
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.