org.hibernate.search.bridge.builtin.impl
Class TwoWayString2FieldBridgeAdaptor

java.lang.Object
  extended by org.hibernate.search.bridge.builtin.impl.String2FieldBridgeAdaptor
      extended by org.hibernate.search.bridge.builtin.impl.TwoWayString2FieldBridgeAdaptor
All Implemented Interfaces:
FieldBridge, StringBridge, TwoWayFieldBridge

public class TwoWayString2FieldBridgeAdaptor
extends String2FieldBridgeAdaptor
implements TwoWayFieldBridge

Bridge to use a TwoWayStringBridge as a TwoWayFieldBridge

Author:
Emmanuel Bernard

Constructor Summary
TwoWayString2FieldBridgeAdaptor(TwoWayStringBridge stringBridge)
           
 
Method Summary
 Object get(String name, org.apache.lucene.document.Document document)
          Build the element object from the Document
 String objectToString(Object object)
          Converts the object representation to a string.
 TwoWayStringBridge unwrap()
           
 
Methods inherited from class org.hibernate.search.bridge.builtin.impl.String2FieldBridgeAdaptor
set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.search.bridge.FieldBridge
set
 

Constructor Detail

TwoWayString2FieldBridgeAdaptor

public TwoWayString2FieldBridgeAdaptor(TwoWayStringBridge stringBridge)
Method Detail

objectToString

public String objectToString(Object object)
Description copied from interface: StringBridge
Converts the object representation to a string.

Specified by:
objectToString in interface StringBridge
Specified by:
objectToString in interface TwoWayFieldBridge
Overrides:
objectToString in class String2FieldBridgeAdaptor
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.

get

public Object get(String name,
                  org.apache.lucene.document.Document document)
Description copied from interface: TwoWayFieldBridge
Build the element object from the Document

Specified by:
get in interface TwoWayFieldBridge
Parameters:
name - field name
document - document
Returns:
The return value is the entity property value.

unwrap

public TwoWayStringBridge unwrap()


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved