org.springframework.data.mongodb.core.convert

Interface MongoConverter

    • Method Detail

      • getTypeMapper

        MongoTypeMapper getTypeMapper()
        Returns thw TypeMapper being used to write type information into Documents created with that converter.
        Returns:
        will never be null.
      • mapValueToTargetType

        @Nullable
        default <S,T> T mapValueToTargetType(S source,
                                                       Class<T> targetType,
                                                       DbRefResolver dbRefResolver)
        Mapping function capable of converting values into a desired target type by eg. extracting the actual java type from a given BsonValue.
        Type Parameters:
        S -
        T -
        Parameters:
        targetType - must not be null.
        dbRefResolver - must not be null.
        Returns:
        new typed Function.
        Throws:
        IllegalArgumentException - if targetType is null.
        Since:
        2.1