org.hibernate.search.bridge
Interface TwoWayFieldBridge

All Superinterfaces:
FieldBridge
All Known Implementing Classes:
DoubleNumericFieldBridge, FloatNumericFieldBridge, IntegerNumericFieldBridge, LongNumericFieldBridge, NullEncodingTwoWayFieldBridge, NumericFieldBridge, TwoWayString2FieldBridgeAdaptor

public interface TwoWayFieldBridge
extends FieldBridge

A FieldBridge able to convert the index representation back into an object without losing information. Any bridge expected to process a document id should implement this interface.

Author:
Emmanuel Bernard

Method Summary
 Object get(String name, org.apache.lucene.document.Document document)
          Build the element object from the Document
 String objectToString(Object object)
          Convert the object representation to a string.
 
Methods inherited from interface org.hibernate.search.bridge.FieldBridge
set
 

Method Detail

get

Object get(String name,
           org.apache.lucene.document.Document document)
Build the element object from the Document

Parameters:
name - field name
document - document
Returns:
The return value is the entity property value.

objectToString

String objectToString(Object object)
Convert the object representation to a string.

Parameters:
object - The object to index.
Returns:
string (index) representation of the specified object. Must not be null, but can be empty.


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