Class IterableConverter


  • public class IterableConverter
    extends TypeConverter
    Author:
    Uwe Schaefer, (us@thomas-daily.de), scotthernandez
    • Constructor Detail

      • IterableConverter

        public IterableConverter()
    • Method Detail

      • decode

        public java.lang.Object decode​(java.lang.Class targetClass,
                                       java.lang.Object fromDBObject,
                                       MappedField mf)
        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
        Parameters:
        targetClass - the class to create and populate
        fromDBObject - the DBObject to use when populating the new instance
        mf - the MappedField that contains the metadata useful for decoding
        Returns:
        the new instance
      • encode

        public java.lang.Object encode​(java.lang.Object value,
                                       MappedField mf)
        Description copied from class: TypeConverter
        encode the (type-safe) java object into the corresponding DBObject
        Overrides:
        encode in class TypeConverter
        Parameters:
        value - The object to encode
        mf - the MappedField that contains the metadata useful for decoding
        Returns:
        the encoded version of the object