public class DefaultMongoTypeMapper extends DefaultTypeMapper<com.mongodb.DBObject> implements MongoTypeMapper
MongoTypeMapper allowing configuration of the key to lookup and store type
information in DBObject. The key defaults to DEFAULT_TYPE_KEY. Actual type-to-String
conversion and back is done in #getTypeString(TypeInformation) or #getTypeInformation(String)
respectively.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultMongoTypeMapper.DBObjectTypeAliasAccessor |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TYPE_KEY |
| Constructor and Description |
|---|
DefaultMongoTypeMapper() |
DefaultMongoTypeMapper(String typeKey) |
DefaultMongoTypeMapper(String typeKey,
List<? extends TypeInformationMapper> mappers) |
DefaultMongoTypeMapper(String typeKey,
MappingContext<? extends PersistentEntity<?,?>,?> mappingContext) |
| Modifier and Type | Method and Description |
|---|---|
protected TypeInformation<?> |
getFallbackTypeFor(com.mongodb.DBObject source) |
boolean |
isTypeKey(String key)
Returns whether the given key is the type key.
|
readType, readType, writeType, writeTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadType, readType, writeType, writeTypepublic static final String DEFAULT_TYPE_KEY
public DefaultMongoTypeMapper()
public DefaultMongoTypeMapper(String typeKey)
public DefaultMongoTypeMapper(String typeKey, MappingContext<? extends PersistentEntity<?,?>,?> mappingContext)
public DefaultMongoTypeMapper(String typeKey, List<? extends TypeInformationMapper> mappers)
public boolean isTypeKey(String key)
MongoTypeMapperisTypeKey in interface MongoTypeMapperprotected TypeInformation<?> getFallbackTypeFor(com.mongodb.DBObject source)
getFallbackTypeFor in class DefaultTypeMapper<com.mongodb.DBObject>Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.