Spring Data Document

org.springframework.data.mongodb.core.convert
Interface TypeMapper

All Known Implementing Classes:
ConfigurableTypeMapper, DefaultTypeMapper

public interface TypeMapper

Interface to define strategies how to store type information in a DBObject.

Author:
Oliver Gierke

Method Summary
 boolean isTypeKey(String key)
          Returns whether the given key is the key being used as type key.
 org.springframework.data.util.TypeInformation<?> readType(DBObject dbObject)
          Reads the TypeInformation from the given DBObject.
 void writeType(Class<?> type, DBObject dbObject)
          Writes type information for the given type into the given DBObject.
 void writeType(org.springframework.data.util.TypeInformation<?> type, DBObject dbObject)
          Writes type information for the given TypeInformation into the given DBObject.
 

Method Detail

isTypeKey

boolean isTypeKey(String key)
Returns whether the given key is the key being used as type key.

Parameters:
key -
Returns:

readType

org.springframework.data.util.TypeInformation<?> readType(DBObject dbObject)
Reads the TypeInformation from the given DBObject.

Parameters:
dbObject - must not be null.
Returns:

writeType

void writeType(Class<?> type,
               DBObject dbObject)
Writes type information for the given type into the given DBObject.

Parameters:
type - must not be null.
dbObject - must not be null.

writeType

void writeType(org.springframework.data.util.TypeInformation<?> type,
               DBObject dbObject)
Writes type information for the given TypeInformation into the given DBObject.

Parameters:
type - must not be null.
dbObject - must not be null.

Spring Data Document

Copyright © 2011. All Rights Reserved.