Interface FromDocumentValueConverter<F,V>

Type Parameters:
F - The type of source values in the document model.
V - The type of target values.
All Known Subinterfaces:
FromDocumentFieldValueConverter<F,V>
All Known Implementing Classes:
DefaultStringConverters.Converter

public interface FromDocumentValueConverter<F,V>
A converter from a source value in the document model to a different value.
  • Method Details

    • fromDocumentValue

      V fromDocumentValue(F value, FromDocumentValueConvertContext context)
      Parameters:
      value - The value to convert from the document model.
      context - A context that can be extended to a more useful type, giving access to such things as a Hibernate ORM Session (if using the Hibernate ORM mapper).
      Returns:
      The converted value.
    • isCompatibleWith

      default boolean isCompatibleWith(FromDocumentValueConverter<?,?> other)
      Parameters:
      other - Another FromDocumentValueConverter, never null.
      Returns:
      true if the given object behaves exactly the same as this object, i.e. its fromDocumentValue(Object, FromDocumentValueConvertContext) method is guaranteed to always return the same value as this object's when given the same input. false otherwise, or when in doubt.