Class TimestampConverter

    • Constructor Detail

      • TimestampConverter

        public TimestampConverter()
        Creates the Converter.
    • Method Detail

      • decode

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

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