Interface ToDocumentIdentifierValueConverter<I>
-
- Type Parameters:
I- The type of source identifier values.
- All Known Implementing Classes:
StringToDocumentIdentifierValueConverter
public interface ToDocumentIdentifierValueConverter<I>A converter from a source identifier value to a target value that should be used as a document identifier.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Stringconvert(I value, ToDocumentIdentifierValueConvertContext context)StringconvertUnknown(Object value, ToDocumentIdentifierValueConvertContext context)Convert an input value of unknown type that may not have the required typeI.default booleanisCompatibleWith(ToDocumentIdentifierValueConverter<?> other)
-
-
-
Method Detail
-
convert
String convert(I value, ToDocumentIdentifierValueConvertContext context)
- Parameters:
value- The source value to convert.context- A context that can beextendedto 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.
-
convertUnknown
String convertUnknown(Object value, ToDocumentIdentifierValueConvertContext context)
Convert an input value of unknown type that may not have the required typeI.Called when passing values to the predicate DSL in particular.
- Parameters:
value- The source value to convert.context- A context that can beextendedto 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
default boolean isCompatibleWith(ToDocumentIdentifierValueConverter<?> other)
- Parameters:
other- AnotherToDocumentIdentifierValueConverter, nevernull.- Returns:
trueif the given object behaves exactly the same as this object, i.e. itsconvertUnknown(Object, ToDocumentIdentifierValueConvertContext)method is guaranteed to always return the same value as this object's when given the same input.falseotherwise, or when in doubt.
-
-