org.hibernate.search.bridge.spi.BridgeProvider 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.spi;
import org.hibernate.search.bridge.FieldBridge;
import org.hibernate.search.engine.service.spi.ServiceManager;
/**
* Service interface to allow custom bridges to be auto discovered.
*
* Implementations of this interface must have a default constructor and a file named
* {@code META-INF/services/org.hibernate.search.bridge.spi.BridgeProvider}
* should contain the fully qualified class name of the bridge provider
* implementation. When several implementations are present in a given JAR,
* place one class name per line.
* This follows the JDK service loader pattern.
*
* @author Emmanuel Bernard
*/
public interface BridgeProvider {
/**
* @return a {@link org.hibernate.search.bridge.FieldBridge} instance if the provider can
* build a bridge for the calling context. {@code null} otherwise.
*/
FieldBridge provideFieldBridge(BridgeProviderContext bridgeProviderContext);
interface BridgeProviderContext {
/**
* Returns the type of the indexed member/property.
*
* @return the type of the indexed member
*/
Class> getReturnType();
/**
* Provides access to the {@code ServiceManager} and gives access to
* Hibernate Search services like the {@code ClassLoaderService}.
*
* @return the Hibernate Search {@code ServiceManager}
*/
ServiceManager getServiceManager();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy