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: 5.11.12.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;

/**
 * {@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