public final class ReflectionReplacingSearchConfiguration extends Object implements SearchConfiguration
| Constructor and Description |
|---|
ReflectionReplacingSearchConfiguration(org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager,
SearchConfiguration searchConfiguration)
Create a new SearchConfiguration which returns the same values as the provided SearchConfiguration
instance, with the exception of
getReflectionManager() which will return the constructor
defined ReflectionManager. |
| Modifier and Type | Method and Description |
|---|---|
ClassLoaderService |
getClassLoaderService() |
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()
Returns the initializer to be used to initialize potentially lazy entities or collections.
|
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 Service>,Object> |
getProvidedServices()
Return the provided services.
|
org.hibernate.annotations.common.reflection.ReflectionManager |
getReflectionManager()
Returns a reflection manager if already available in the environment
null otherwise
|
boolean |
isDeleteByTermEnforced() |
boolean |
isIdProvidedImplicit() |
boolean |
isIndexMetadataComplete() |
boolean |
isJPAAnnotationsProcessingEnabled() |
boolean |
isMultitenancyEnabled() |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBeanResolverpublic ReflectionReplacingSearchConfiguration(org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager,
SearchConfiguration searchConfiguration)
getReflectionManager() which will return the constructor
defined ReflectionManager.reflectionManager - the current reflection managersearchConfiguration - the search configurationpublic Iterator<Class<?>> getClassMappings()
SearchConfigurationgetClassMappings in interface SearchConfigurationpublic Class<?> getClassMapping(String name)
SearchConfigurationClass from a String parameter.getClassMapping in interface SearchConfigurationname - the class name as stringpublic String getProperty(String propertyName)
SearchConfigurationgetProperty in interface SearchConfigurationpropertyName - - as a String.public Properties getProperties()
SearchConfigurationgetProperties in interface SearchConfigurationobjectpublic org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
SearchConfigurationgetReflectionManager in interface SearchConfigurationpublic SearchMapping getProgrammaticMapping()
getProgrammaticMapping in interface SearchConfigurationnullpublic Map<Class<? extends Service>,Object> getProvidedServices()
SearchConfigurationgetProvidedServices in interface SearchConfigurationpublic boolean isTransactionManagerExpected()
SearchConfigurationisTransactionManagerExpected in interface SearchConfigurationfalse Search will avoid logging such warnings.public InstanceInitializer getInstanceInitializer()
SearchConfigurationgetInstanceInitializer in interface SearchConfigurationpublic boolean isIndexMetadataComplete()
isIndexMetadataComplete in interface SearchConfigurationtrue 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.public boolean isDeleteByTermEnforced()
isDeleteByTermEnforced in interface SearchConfigurationtrue if regardless of isIndexMetadataComplete and the number
of types present in the index it is safe to delete by term given that the underlying
store guarantees uniqueness of idspublic boolean isIdProvidedImplicit()
isIdProvidedImplicit in interface SearchConfigurationtrue if we should treat indexed entities as implicitly annotated
with a ProvidedId, if no other Id is specified.public ClassLoaderService getClassLoaderService()
getClassLoaderService in interface SearchConfigurationServiceManager.getClassLoaderService()public boolean isMultitenancyEnabled()
isMultitenancyEnabled in interface SearchConfigurationtrue if multitenancy
should be enabled. When in doubt, this should return true.public boolean isJPAAnnotationsProcessingEnabled()
isJPAAnnotationsProcessingEnabled in interface SearchConfigurationtrue if the Hibernate Search mapping should look for JPA annotations to affect the mapping.
Disable this if the JPA API is not available, or to ignore them.
Ignoring them implies to ignore, among others, the javax.persistence.Id annotation, which
implies the primary identifiers will require explicit mapping over the "provided id" mechanism or
the use of DocumentId.Copyright © 2006–2017 Hibernate. All rights reserved.