org.hibernate.search.cfg.spi
Interface SearchConfiguration

All Known Implementing Classes:
IncrementalSearchConfiguration, ReflectionReplacingSearchConfiguration, SearchConfigurationBase, SearchConfigurationFromHibernateCore

public interface SearchConfiguration

Provides configuration to Hibernate Search

Author:
Navin Surtani - navin@surtani.org, Emmanuel Bernard

Method Summary
 Class<?> getClassMapping(String name)
          Returns a Class from a String parameter.
 Iterator<Class<?>> getClassMappings()
          Returns an iterator over the list of indexed classes
 InstanceInitializer getInstanceInitializer()
           
 SearchMapping getProgrammaticMapping()
           
 Properties getProperties()
          Gets properties as a java.util.Properties object.
 String getProperty(String propertyName)
          Gets a configuration property from its name or null if not present
 Map<Class<? extends ServiceProvider<?>>,Object> getProvidedServices()
          Provide service instances.
 org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
          Returns a reflection manager if already available in the environment null otherwise
 boolean isIndexMetadataComplete()
           
 boolean isTransactionManagerExpected()
          By default Hibernate Search expects to execute in the context of a transaction, and will log warning when certain operations are executed out of such a scope.
 

Method Detail

getClassMappings

Iterator<Class<?>> getClassMappings()
Returns an iterator over the list of indexed classes

Returns:
iterator of indexed classes.

getClassMapping

Class<?> getClassMapping(String name)
Returns a Class from a String parameter.

Parameters:
name -
Returns:
corresponding class instance.

getProperty

String getProperty(String propertyName)
Gets a configuration property from its name or null if not present

Parameters:
propertyName - - as a String.
Returns:
the property as a String

getProperties

Properties getProperties()
Gets properties as a java.util.Properties object.

Returns:
a java.util.Properties object.
See Also:
object

getReflectionManager

org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
Returns a reflection manager if already available in the environment null otherwise

Returns:
ReflectionManager

getProgrammaticMapping

SearchMapping getProgrammaticMapping()
Returns:
the programmatic configuration or null

getProvidedServices

Map<Class<? extends ServiceProvider<?>>,Object> getProvidedServices()
Provide service instances. Return the provided services (provider and instance at stake) These services are passed untouched by Hibernate Search via the BuildContext.requestService(Class) API Note that the lifecycle methods: - org.hibernate.search.spi.ServiceProvider#start(java.util.Properties) - ServiceProvider.stop() of the provider are *not* called. For services using the same ServiceProvider class, provided services have priority over managed services (ie the ones using the service locator pattern).


isTransactionManagerExpected

boolean isTransactionManagerExpected()
By default Hibernate Search expects to execute in the context of a transaction, and will log warning when certain operations are executed out of such a scope.

Returns:
when returning false Search will avoid logging such warnings.

isIndexMetadataComplete

boolean isIndexMetadataComplete()
Returns:
true if it is safe to assume that the information we have about index metadata is accurate. This should be set to false for example if the index could contain Documents related to types not known to this SearchFactory instance.

getInstanceInitializer

InstanceInitializer getInstanceInitializer()


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