public class String2FieldBridgeAdaptor extends Object implements FieldBridge, StringBridge, AppliedOnTypeAwareBridge, BridgeAdaptor
| Constructor and Description |
|---|
String2FieldBridgeAdaptor(StringBridge stringBridge) |
| Modifier and Type | Method and Description |
|---|---|
String |
objectToString(Object object)
Converts the object representation to a string.
|
void |
set(String name,
Object value,
org.apache.lucene.document.Document document,
LuceneOptions luceneOptions)
Manipulate the document to index the given value.
|
void |
setAppliedOnType(Class<?> returnType)
Set the return type of the bridge (the type of the field linked to the bridge).
|
String |
toString() |
<T> T |
unwrap(Class<T> bridgeClass)
Return an object of the specified type to allow access to specific
bridge interfaces.
|
public String2FieldBridgeAdaptor(StringBridge stringBridge)
public void set(String name, Object value, org.apache.lucene.document.Document document, LuceneOptions luceneOptions)
FieldBridge
A common implementation is to add a Field with the given name to document following
the parameters luceneOptions if the value is not null.
String fieldValue = convertToString(value);
luceneOptions.addFieldToDocument(name, fieldValue, document);
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.public String objectToString(Object object)
StringBridgeobjectToString in interface StringBridgeobject - The object to transform into a string representation.null. It can be empty though.public void setAppliedOnType(Class<?> returnType)
AppliedOnTypeAwareBridgesetAppliedOnType in interface AppliedOnTypeAwareBridgereturnType - return typepublic <T> T unwrap(Class<T> bridgeClass)
BridgeAdaptorIf no adapted bridge matches this type, null is returned.
unwrap in interface BridgeAdaptornull if there is none.Copyright © 2006–2017 Hibernate. All rights reserved.