Interface ToDocumentValueConverter<V,F>
- Type Parameters:
V
- The type of source values.F
- The type of target values in the document model.
- All Known Subinterfaces:
ToDocumentFieldValueConverter<V,
F>
- All Known Implementing Classes:
DefaultStringConverters.Converter
public interface ToDocumentValueConverter<V,F>
A converter from a source value to a target value in the document model.
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
isCompatibleWith
(ToDocumentValueConverter<?, ?> other) toDocumentValue
(V value, ToDocumentValueConvertContext context)
-
Method Details
-
toDocumentValue
- Parameters:
value
- The source value to convert to the document model.context
- A context that can beextended
to a more useful type, giving access to such things as a Hibernate ORM SessionFactory (if using the Hibernate ORM mapper).- Returns:
- The converted index field value.
-
isCompatibleWith
- Parameters:
other
- AnotherToDocumentValueConverter
, nevernull
.- Returns:
true
if the given object behaves exactly the same as this object, i.e. itstoDocumentValue(Object, ToDocumentValueConvertContext)
method is guaranteed to always return the same value as this object's when given the same input.false
otherwise, or when in doubt.
-