org.mongodb.morphia.converters
Class ObjectIdConverter

java.lang.Object
  extended by org.mongodb.morphia.converters.TypeConverter
      extended by org.mongodb.morphia.converters.ObjectIdConverter
All Implemented Interfaces:
SimpleValueConverter

public class ObjectIdConverter
extends TypeConverter
implements SimpleValueConverter

Convert to an ObjectId from string

Author:
scotthernandez

Constructor Summary
ObjectIdConverter()
           
 
Method Summary
 Object decode(Class targetClass, Object val, MappedField optionalExtraInfo)
          decode the DBObject and provide the corresponding java (type-safe) object
NOTE: optionalExtraInfo might be null
 
Methods inherited from class org.mongodb.morphia.converters.TypeConverter
decode, encode, encode, equals, getMapper, getSupportTypes, hashCode, isSupported, oneOf, oneOfClasses, setMapper, setSupportedTypes, setSupportTypes
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectIdConverter

public ObjectIdConverter()
Method Detail

decode

public Object decode(Class targetClass,
                     Object val,
                     MappedField optionalExtraInfo)
Description copied from class: TypeConverter
decode the DBObject and provide the corresponding java (type-safe) object
NOTE: optionalExtraInfo might be null

Specified by:
decode in class TypeConverter