org.hibernate.search.spi
Interface SearchFactoryIntegrator

All Superinterfaces:
SearchFactory
All Known Subinterfaces:
SearchFactoryImplementor, SearchFactoryImplementorWithShareableState
All Known Implementing Classes:
ImmutableSearchFactory, MutableSearchFactory

public interface SearchFactoryIntegrator
extends SearchFactory

This contract is considered experimental. This contract gives access to lower level APIs of Hibernate Search for frameworks integrating with it. The piece of code creating the SearchFactory should use this contract. It should however pass the higher level SearchFactory contract to its clients. It also allows modification of some of the search factory internals: - today allow addition of new indexed classes.

Author:
Emmanuel Bernard
Experimental

Method Summary
 void addClasses(Class<?>... classes)
          Add the following classes to the SearchFactory.
 void close()
           
 HSQuery createHSQuery()
          Return an Hibernate Search query object.
 TimeoutExceptionFactory getDefaultTimeoutExceptionFactory()
           
 ErrorHandler getErrorHandler()
          Used to catch exceptions in all synchronous operations; but default they are logged, the user can configure alternative error management means.
 EntityIndexBinding getIndexBinding(Class<?> entityType)
          Returns the entity to index binding for the given type.
 EntityIndexBinder getIndexBindingForEntity(Class<?> entityType)
          Deprecated. since 4.4. Use getIndexBinding(Class)
 Worker getWorker()
           
 boolean isStopped()
           
 
Methods inherited from interface org.hibernate.search.SearchFactory
buildQueryBuilder, getAnalyzer, getAnalyzer, getIndexedTypeDescriptor, getIndexedTypes, getIndexReaderAccessor, getStatistics, optimize, optimize
 

Method Detail

getIndexBindingForEntity

@Deprecated
EntityIndexBinder getIndexBindingForEntity(Class<?> entityType)
Deprecated. since 4.4. Use getIndexBinding(Class)


getIndexBinding

EntityIndexBinding getIndexBinding(Class<?> entityType)
Returns the entity to index binding for the given type.

Parameters:
entityType - the type for which to retrieve the binding
Returns:
the entity to index binding for the given type. null is returned for types which are unindexed or unknown.

addClasses

void addClasses(Class<?>... classes)
Add the following classes to the SearchFactory. If these classes are new to the SearchFactory this will trigger a reconfiguration.


getWorker

Worker getWorker()

close

void close()

createHSQuery

HSQuery createHSQuery()
Return an Hibernate Search query object. This object uses fluent APIs to define the query executed. Offers a few execution approaches: - return the list of results eagerly - return the list of results lazily - get the number of results


isStopped

boolean isStopped()
Returns:
true if the SearchFactory was stopped

getErrorHandler

ErrorHandler getErrorHandler()
Used to catch exceptions in all synchronous operations; but default they are logged, the user can configure alternative error management means.

Returns:
the configured ErrorHandler, global to the SearchFactory

getDefaultTimeoutExceptionFactory

TimeoutExceptionFactory getDefaultTimeoutExceptionFactory()


Copyright © 2006-2013 Red Hat Middleware, LLC. All Rights Reserved