Class PojoIdentifierBridgeDocumentValueConverter<I>
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.bridge.runtime.impl.PojoIdentifierBridgeDocumentValueConverter<I>
-
- All Implemented Interfaces:
FromDocumentValueConverter<String,I>,ToDocumentValueConverter<I,String>
public final class PojoIdentifierBridgeDocumentValueConverter<I> extends Object implements ToDocumentValueConverter<I,String>, FromDocumentValueConverter<String,I>
-
-
Constructor Summary
Constructors Constructor Description PojoIdentifierBridgeDocumentValueConverter(IdentifierBridge<I> bridge)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IfromDocumentValue(String value, FromDocumentValueConvertContext context)booleanisCompatibleWith(FromDocumentValueConverter<?,?> other)booleanisCompatibleWith(ToDocumentValueConverter<?,?> other)StringtoDocumentValue(I value, ToDocumentValueConvertContext context)StringtoString()
-
-
-
Constructor Detail
-
PojoIdentifierBridgeDocumentValueConverter
public PojoIdentifierBridgeDocumentValueConverter(IdentifierBridge<I> bridge)
-
-
Method Detail
-
toDocumentValue
public String toDocumentValue(I value, ToDocumentValueConvertContext context)
- Specified by:
toDocumentValuein interfaceToDocumentValueConverter<I,String>- 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 I fromDocumentValue(String value, FromDocumentValueConvertContext context)
- Specified by:
fromDocumentValuein interfaceFromDocumentValueConverter<String,I>- 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<I,String>- 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<String,I>- 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.
-
-