org.mongodb.morphia.converters
Class EnumSetConverter

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

public class EnumSetConverter
extends TypeConverter
implements SimpleValueConverter

Author:
Uwe Schaefer, ([email protected]), scotthernandez

Constructor Summary
EnumSetConverter()
           
 
Method Summary
 Object decode(Class targetClass, Object fromDBObject, MappedField optionalExtraInfo)
          decode the DBObject and provide the corresponding java (type-safe) object
NOTE: optionalExtraInfo might be null
 Object encode(Object value, MappedField optionalExtraInfo)
          encode the (type-safe) java object into the corresponding DBObject
 
Methods inherited from class org.mongodb.morphia.converters.TypeConverter
decode, 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

EnumSetConverter

public EnumSetConverter()
Method Detail

decode

public Object decode(Class targetClass,
                     Object fromDBObject,
                     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

encode

public Object encode(Object value,
                     MappedField optionalExtraInfo)
Description copied from class: TypeConverter
encode the (type-safe) java object into the corresponding DBObject

Overrides:
encode in class TypeConverter