org.hibernate.search.bridge.builtin.impl
public class NullEncodingTwoWayFieldBridge extends Object implements TwoWayFieldBridge
| Constructor and Description |
|---|
NullEncodingTwoWayFieldBridge(TwoWayFieldBridge fieldBridge,
String nullMarker) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String name,
Document document)
Build the element object from the
Document |
String |
objectToString(Object object)
Convert the object representation to a string.
|
void |
set(String name,
Object value,
Document document,
LuceneOptions luceneOptions)
Manipulate the document to index the given value.
|
TwoWayFieldBridge |
unwrap() |
public NullEncodingTwoWayFieldBridge(TwoWayFieldBridge fieldBridge, String nullMarker)
public Object get(String name, Document document)
TwoWayFieldBridgeDocumentget in interface TwoWayFieldBridgename - field namedocument - documentpublic String objectToString(Object object)
TwoWayFieldBridgeobjectToString in interface TwoWayFieldBridgeobject - The object to index.null, but
can be empty.public TwoWayFieldBridge unwrap()
public void set(String name, Object value, Document document, LuceneOptions luceneOptions)
FieldBridgename to document following
the parameters luceneOptions if the value is not null.
{code}
String fieldValue = convertToString(value);
luceneOptions.addFieldToDocument(name, fieldValue, document);
{code}set in interface FieldBridgename - 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 adding value to
the Lucene document.Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved