Class PojoValueBridgeDocumentValueConverter<V,F>
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.bridge.runtime.impl.PojoValueBridgeDocumentValueConverter<V,F>
-
- All Implemented Interfaces:
FromDocumentValueConverter<F,V>,ToDocumentValueConverter<V,F>
public final class PojoValueBridgeDocumentValueConverter<V,F> extends Object implements ToDocumentValueConverter<V,F>, FromDocumentValueConverter<F,V>
-
-
Constructor Summary
Constructors Constructor Description PojoValueBridgeDocumentValueConverter(ValueBridge<V,F> bridge)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VfromDocumentValue(F value, FromDocumentValueConvertContext context)booleanisCompatibleWith(FromDocumentValueConverter<?,?> other)booleanisCompatibleWith(ToDocumentValueConverter<?,?> other)FtoDocumentValue(V value, ToDocumentValueConvertContext context)StringtoString()
-
-
-
Constructor Detail
-
PojoValueBridgeDocumentValueConverter
public PojoValueBridgeDocumentValueConverter(ValueBridge<V,F> bridge)
-
-
Method Detail
-
toDocumentValue
public F toDocumentValue(V value, ToDocumentValueConvertContext context)
- Specified by:
toDocumentValuein interfaceToDocumentValueConverter<V,F>- Parameters:
value- The source value to convert to the document model.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.
-
fromDocumentValue
public V fromDocumentValue(F value, FromDocumentValueConvertContext context)
- Specified by:
fromDocumentValuein interfaceFromDocumentValueConverter<V,F>- Parameters:
value- The value to convert from the document model.context- A context that can beextendedto 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
public boolean isCompatibleWith(ToDocumentValueConverter<?,?> other)
- Specified by:
isCompatibleWithin interfaceToDocumentValueConverter<V,F>- Parameters:
other- AnotherToDocumentValueConverter, nevernull.- Returns:
trueif the given object behaves exactly the same as this object, i.e. itsToDocumentValueConverter.toDocumentValue(Object, ToDocumentValueConvertContext)method is guaranteed to always return the same value as this object's when given the same input.falseotherwise, or when in doubt.
-
isCompatibleWith
public boolean isCompatibleWith(FromDocumentValueConverter<?,?> other)
- Specified by:
isCompatibleWithin interfaceFromDocumentValueConverter<V,F>- Parameters:
other- AnotherFromDocumentValueConverter, nevernull.- Returns:
trueif the given object behaves exactly the same as this object, i.e. itsFromDocumentValueConverter.fromDocumentValue(Object, FromDocumentValueConvertContext)method is guaranteed to always return the same value as this object's when given the same input.falseotherwise, or when in doubt.
-
-