org.hibernate.search.bridge.TwoWayFieldBridge Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-search-engine Show documentation
Show all versions of hibernate-search-engine Show documentation
Core of the Object/Lucene mapper, query engine and index management
/*
* Hibernate Search, full-text search for your domain model
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.search.bridge;
import org.apache.lucene.document.Document;
/**
* 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
*/
// FIXME rework the interface inheritance there are some common concepts with StringBridge
public interface TwoWayFieldBridge extends FieldBridge {
/**
* Build the element object from the Document
*
* @param name field name
* @param document document
* @return The return value is the entity property value.
*/
Object get(String name, Document document);
/**
* Convert the object representation to a string.
*
* @param object The object to index.
* @return string (index) representation of the specified object. Must not be null
, but
* can be empty.
*/
String objectToString(Object object);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy