Package org.hibernate.search.bridge
Class String2FieldBridgeAdaptor
java.lang.Object
org.hibernate.search.bridge.String2FieldBridgeAdaptor
- All Implemented Interfaces:
FieldBridge,StringBridge
- Direct Known Subclasses:
TwoWayString2FieldBridgeAdaptor
Bridge to use a StringBridge as a FieldBridge.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionobjectToString(Object object) Converts the object representation to a string.voidset(String name, Object value, Document document, LuceneOptions luceneOptions) Manipulate the document to index the given value.
-
Constructor Details
-
String2FieldBridgeAdaptor
-
-
Method Details
-
set
Description copied from interface:FieldBridgeManipulate the document to index the given value. A common implementation is to add a Field with the givennametodocumentfollowing the parametersluceneOptionsif thevalueis notnull. {code} String fieldValue = convertToString(value); luceneOptions.addFieldToDocument(name, fieldValue, document); {code}- Specified by:
setin interfaceFieldBridge- Parameters:
name- The field to add to the Lucene documentvalue- The actual value to indexdocument- The Lucene document into which we want to index the value.luceneOptions- Contains the parameters used for addingvalueto the Lucene document.
-
objectToString
Description copied from interface:StringBridgeConverts the object representation to a string.- Specified by:
objectToStringin interfaceStringBridge- Parameters:
object- The object to transform into a string representation.- Returns:
- String representation of the given object to be stored in Lucene index. The return string must not be
null. It can be empty though.
-