All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.search.bridge.TwoWayStringBridge Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
/*
 * 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;

/**
 * StringBridge allowing a translation from the string representation back to the Object.
 * objectToString( stringToObject( string ) ) and stringToObject( objectToString( object ) )
 * should be "idempotent". More precisely:
 * 
    *
  • objectToString( stringToObject( string ) ).equals(string), for non null string.
  • *
  • stringToObject( objectToString( object ) ).equals(object), for non 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); }