org.hibernate.search.impl
Class ConfigContext
java.lang.Object
org.hibernate.search.impl.ConfigContext
public final class ConfigContext
- extends Object
Provides access to some default configuration settings (eg default Analyzer or default
Similarity) and checks whether certain optional libraries are available.
- Author:
- Emmanuel Bernard, Hardy Ferentschik
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigContext
public ConfigContext(SearchConfiguration cfg)
ConfigContext
public ConfigContext(SearchConfiguration cfg,
SearchMapping searchMapping)
addAnalyzerDef
public void addAnalyzerDef(AnalyzerDef analyzerDef,
org.hibernate.annotations.common.reflection.XAnnotatedElement annotatedElement)
- Add an analyzer definition which was defined as annotation.
- Parameters:
analyzerDef - the analyzer definition annotationannotatedElement - the annotated element it was defined on
addGlobalAnalyzerDef
public void addGlobalAnalyzerDef(AnalyzerDef analyzerDef)
buildLazyAnalyzer
public org.apache.lucene.analysis.Analyzer buildLazyAnalyzer(String name)
getDefaultNullToken
public String getDefaultNullToken()
getDefaultAnalyzer
public org.apache.lucene.analysis.Analyzer getDefaultAnalyzer()
getLuceneMatchVersion
public org.apache.lucene.util.Version getLuceneMatchVersion()
initLazyAnalyzers
public Map<String,org.apache.lucene.analysis.Analyzer> initLazyAnalyzers()
isJpaPresent
public boolean isJpaPresent()
isProvidedIdImplicit
public boolean isProvidedIdImplicit()
- Returns:
- true if we have to assume entities are annotated with @ProvidedId implicitly
getClassBridgeInstances
public Map<FieldBridge,ClassBridge> getClassBridgeInstances(Class<?> type)
- Returns class bridge instances configured via the programmatic API, if any. The returned map's values are
@ClassBridge annotations representing the corresponding analyzer etc. configuration.
- Parameters:
type - the type for which to return the configured class bridge instances
- Returns:
- a map with class bridge instances and their configuration; May be empty but never
null
Copyright © 2006–2013 Hibernate. All rights reserved.