@SuppressWarnings("rawtypes") public class MongoMappingContext extends DocumentMappingContext
Models a MappingContext for Mongo.
| Fields inherited from class | Fields |
|---|---|
class DocumentMappingContext |
GROOVY_PROXY_FACTORY_NAME, JAVASIST_PROXY_FACTORY, CONFIGURATION_PREFIX |
| Constructor and description |
|---|
MongoMappingContext(String defaultDatabaseName) |
MongoMappingContext(String defaultDatabaseName, Closure defaultMapping) |
MongoMappingContext(String defaultDatabaseName, Closure defaultMapping, Class classes)Constructs a new MongoMappingContext for the given arguments |
MongoMappingContext(PropertyResolver configuration, Class classes)Constructs a new MongoMappingContext for the given arguments |
MongoMappingContext(AbstractMongoConnectionSourceSettings settings, Class classes)Construct a new context for the given settings and classes |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public ObjectId |
convert(String source) |
|
public String |
convert(ObjectId source) |
|
public Binary |
convert(byte[] source) |
|
public byte[] |
convert(Binary source) |
|
public BigDecimal |
convert(Decimal128 source) |
|
public Decimal128 |
convert(BigDecimal source) |
|
public BigInteger |
convert(Decimal128 source) |
|
public Decimal128 |
convert(BigInteger source) |
|
protected MappingFactory |
createDocumentMappingFactory(Closure defaultMapping) |
|
public PersistentEntity |
createEmbeddedEntity(Class type) |
|
public CodecRegistry |
getCodecRegistry()
|
|
public static String |
getDefaultDatabaseName(PropertyResolver configuration) |
|
protected void |
initialize(ConnectionSourceSettings settings) |
|
public static boolean |
isMongoNativeType(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.