org.hibernate.search.bridge.TwoWayStringBridge 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;
/**
* {@link StringBridge} allowing a translation from the string representation back to the {@code Object}.
* {@code objectToString( stringToObject( string ) )} and {@code stringToObject( objectToString( object ) )}
* should be "idempotent". More precisely:
*
* - {@code objectToString( stringToObject( string ) ).equals(string)}, for non {@code null} string.
* - {@code stringToObject( objectToString( object ) ).equals(object)}, for non {@code null} object.
*
*
* As for all Bridges implementations must be threadsafe.
*
* @author Emmanuel Bernard
*/
public interface TwoWayStringBridge extends StringBridge {
/**
* Convert the index string representation to an object.
*
* @param stringValue The index value.
* @return Takes the string representation from the Lucene index and transforms it back into the original
* Object
.
*/
Object stringToObject(String stringValue);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy