@java.lang.SuppressWarnings("rawtypes") public class MongoMappingContext extends org.grails.datastore.mapping.document.config.DocumentMappingContext
Models a org.grails.datastore.mapping.model.MappingContext for Mongo.
Fields inherited from class | Fields |
---|---|
class org.grails.datastore.mapping.document.config.DocumentMappingContext |
GROOVY_PROXY_FACTORY_NAME, JAVASIST_PROXY_FACTORY, CONFIGURATION_PREFIX |
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 org.grails.datastore.mapping.model.MappingFactory |
createDocumentMappingFactory(groovy.lang.Closure defaultMapping) |
|
public org.grails.datastore.mapping.model.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) |
|
protected void |
initialize(org.grails.datastore.mapping.core.connections.ConnectionSourceSettings settings) |
|
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() |
Methods inherited from class | Name |
---|---|
class org.grails.datastore.mapping.document.config.DocumentMappingContext |
org.grails.datastore.mapping.document.config.DocumentMappingContext#getMappingSyntaxStrategy(), org.grails.datastore.mapping.document.config.DocumentMappingContext#getMappingFactory(), org.grails.datastore.mapping.document.config.DocumentMappingContext#getDefaultMapping(), org.grails.datastore.mapping.document.config.DocumentMappingContext#getDefaultDatabaseName(), org.grails.datastore.mapping.document.config.DocumentMappingContext#isInitialized(), org.grails.datastore.mapping.document.config.DocumentMappingContext#getConversionService(), org.grails.datastore.mapping.document.config.DocumentMappingContext#getValidatorRegistry(), org.grails.datastore.mapping.document.config.DocumentMappingContext#addTypeConverter(org.springframework.core.convert.converter.Converter), org.grails.datastore.mapping.document.config.DocumentMappingContext#getConverterRegistry(), org.grails.datastore.mapping.document.config.DocumentMappingContext#getEntityValidator(org.grails.datastore.mapping.model.PersistentEntity), org.grails.datastore.mapping.document.config.DocumentMappingContext#isPersistentEntity(java.lang.Object), org.grails.datastore.mapping.document.config.DocumentMappingContext#isPersistentEntity(java.lang.Class), org.grails.datastore.mapping.document.config.DocumentMappingContext#setProxyFactory(org.grails.datastore.mapping.proxy.ProxyFactory), org.grails.datastore.mapping.document.config.DocumentMappingContext#addMappingContextListener(org.grails.datastore.mapping.model.MappingContext$Listener), org.grails.datastore.mapping.document.config.DocumentMappingContext#createEmbeddedEntity(java.lang.Class), org.grails.datastore.mapping.document.config.DocumentMappingContext#getEntityReflector(org.grails.datastore.mapping.model.PersistentEntity), org.grails.datastore.mapping.document.config.DocumentMappingContext#createEntityAccess(org.grails.datastore.mapping.model.PersistentEntity, java.lang.Object), org.grails.datastore.mapping.document.config.DocumentMappingContext#setCanInitializeEntities(boolean), org.grails.datastore.mapping.document.config.DocumentMappingContext#getPersistentEntities(), org.grails.datastore.mapping.document.config.DocumentMappingContext#isInInheritanceHierarchy(org.grails.datastore.mapping.model.PersistentEntity), org.grails.datastore.mapping.document.config.DocumentMappingContext#getChildEntityByDiscriminator(org.grails.datastore.mapping.model.PersistentEntity, java.lang.String), org.grails.datastore.mapping.document.config.DocumentMappingContext#getChildEntities(org.grails.datastore.mapping.model.PersistentEntity), org.grails.datastore.mapping.document.config.DocumentMappingContext#getDirectChildEntities(org.grails.datastore.mapping.model.PersistentEntity), org.grails.datastore.mapping.document.config.DocumentMappingContext#addPersistentEntities([Ljava.lang.Class;), org.grails.datastore.mapping.document.config.DocumentMappingContext#addExternalPersistentEntity(java.lang.Class), org.grails.datastore.mapping.document.config.DocumentMappingContext#addEntityValidator(org.grails.datastore.mapping.model.PersistentEntity, org.springframework.validation.Validator), org.grails.datastore.mapping.document.config.DocumentMappingContext#setValidatorRegistry(org.grails.datastore.mapping.validation.ValidatorRegistry), org.grails.datastore.mapping.document.config.DocumentMappingContext#getMultiTenancyMode(), org.grails.datastore.mapping.document.config.DocumentMappingContext#addPersistentEntity(java.lang.Class, boolean), org.grails.datastore.mapping.document.config.DocumentMappingContext#addPersistentEntity(java.lang.Class), org.grails.datastore.mapping.document.config.DocumentMappingContext#getProxyHandler(), org.grails.datastore.mapping.document.config.DocumentMappingContext#getPersistentEntity(java.lang.String), org.grails.datastore.mapping.document.config.DocumentMappingContext#getProxyFactory(), org.grails.datastore.mapping.document.config.DocumentMappingContext#initialize(), org.grails.datastore.mapping.document.config.DocumentMappingContext#configure(org.springframework.core.env.PropertyResolver), org.grails.datastore.mapping.document.config.DocumentMappingContext#wait(long, int), org.grails.datastore.mapping.document.config.DocumentMappingContext#wait(), org.grails.datastore.mapping.document.config.DocumentMappingContext#wait(long), org.grails.datastore.mapping.document.config.DocumentMappingContext#equals(java.lang.Object), org.grails.datastore.mapping.document.config.DocumentMappingContext#toString(), org.grails.datastore.mapping.document.config.DocumentMappingContext#hashCode(), org.grails.datastore.mapping.document.config.DocumentMappingContext#getClass(), org.grails.datastore.mapping.document.config.DocumentMappingContext#notify(), org.grails.datastore.mapping.document.config.DocumentMappingContext#notifyAll() |
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.