Class IdentityConverter


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

      • IdentityConverter

        public IdentityConverter​(java.lang.Class... types)
        Creates the Converter.
        Parameters:
        types - the types to pass through this converter
    • Method Detail

      • decode

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

        protected boolean isSupported​(java.lang.Class c,
                                      MappedField optionalExtraInfo)
        Description copied from class: TypeConverter
        checks if the class is supported for this converter.
        Overrides:
        isSupported in class TypeConverter