org.hibernate.search.engine
Class DocumentBuilderContainedEntity<T>
java.lang.Object
org.hibernate.search.engine.DocumentBuilderContainedEntity<T>
- All Implemented Interfaces:
- DocumentBuilder
- Direct Known Subclasses:
- DocumentBuilderIndexedEntity
public class DocumentBuilderContainedEntity<T>
- extends java.lang.Object
- implements DocumentBuilder
Set up and provide a manager for classes which are indexed via @IndexedEmbedded
, but themselves do not
contain the @Indexed
annotation.
- Author:
- Gavin King, Emmanuel Bernard, Sylvain Vieujot, Richard Hallier, Hardy Ferentschik
Constructor Summary |
DocumentBuilderContainedEntity(org.hibernate.annotations.common.reflection.XClass clazz,
InitContext context,
org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager)
Constructor used on contained entities not annotated with @Indexed themselves. |
Method Summary |
void |
addWorkToQueue(java.lang.Class<T> entityClass,
T entity,
java.io.Serializable id,
WorkType workType,
java.util.List<LuceneWork> queue,
SearchFactoryImplementor searchFactoryImplementor)
|
protected void |
checkDocumentId(org.hibernate.annotations.common.reflection.XProperty member,
DocumentBuilderContainedEntity.PropertiesMetadata propertiesMetadata,
boolean isRoot,
java.lang.String prefix,
InitContext context)
|
org.apache.lucene.analysis.Analyzer |
getAnalyzer()
|
protected org.apache.lucene.analysis.Analyzer |
getAnalyzer(Analyzer analyzerAnn,
InitContext context)
|
protected org.apache.lucene.analysis.Analyzer |
getAnalyzer(org.hibernate.annotations.common.reflection.XAnnotatedElement annotatedElement,
InitContext context)
|
protected float |
getBoost(org.hibernate.annotations.common.reflection.XClass element)
|
protected java.lang.Float |
getBoost(org.hibernate.annotations.common.reflection.XProperty member,
Field fieldAnn)
|
protected BoostStrategy |
getDynamicBoost(org.hibernate.annotations.common.reflection.XClass element)
|
protected BoostStrategy |
getDynamicBoost(org.hibernate.annotations.common.reflection.XProperty member)
|
EntityState |
getEntityState()
|
protected java.lang.String |
getIdAttributeName(org.hibernate.annotations.common.reflection.XProperty member,
java.lang.annotation.Annotation idAnnotation)
Determines the property name for the document id. |
protected org.apache.lucene.document.Field.Index |
getIndex(Index index)
|
java.util.Set<java.lang.Class<?>> |
getMappedSubclasses()
|
org.apache.lucene.search.Similarity |
getSimilarity()
|
protected org.apache.lucene.document.Field.TermVector |
getTermVector(TermVector vector)
|
protected void |
init(org.hibernate.annotations.common.reflection.XClass clazz,
InitContext context)
|
protected void |
initializeMemberLevelAnnotations(org.hibernate.annotations.common.reflection.XProperty member,
DocumentBuilderContainedEntity.PropertiesMetadata propertiesMetadata,
boolean isRoot,
java.lang.String prefix,
java.util.Set<org.hibernate.annotations.common.reflection.XClass> processedClasses,
InitContext context)
|
boolean |
isRoot()
|
void |
postInitialize(java.util.Set<java.lang.Class<?>> indexedClasses)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
metadata
protected final DocumentBuilderContainedEntity.PropertiesMetadata metadata
beanClass
protected final org.hibernate.annotations.common.reflection.XClass beanClass
mappedSubclasses
protected java.util.Set<java.lang.Class<?>> mappedSubclasses
reflectionManager
protected org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager
level
protected int level
maxLevel
protected int maxLevel
analyzer
protected final ScopedAnalyzer analyzer
similarity
protected org.apache.lucene.search.Similarity similarity
isRoot
protected boolean isRoot
entityState
protected EntityState entityState
DocumentBuilderContainedEntity
public DocumentBuilderContainedEntity(org.hibernate.annotations.common.reflection.XClass clazz,
InitContext context,
org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager)
- Constructor used on contained entities not annotated with
@Indexed
themselves.
- Parameters:
clazz
- The class for which to build a DocumentBuilderContainedEntity
.context
- Handle to default configuration settings.reflectionManager
- Reflection manager to use for processing the annotations.
init
protected void init(org.hibernate.annotations.common.reflection.XClass clazz,
InitContext context)
isRoot
public boolean isRoot()
initializeMemberLevelAnnotations
protected void initializeMemberLevelAnnotations(org.hibernate.annotations.common.reflection.XProperty member,
DocumentBuilderContainedEntity.PropertiesMetadata propertiesMetadata,
boolean isRoot,
java.lang.String prefix,
java.util.Set<org.hibernate.annotations.common.reflection.XClass> processedClasses,
InitContext context)
getAnalyzer
protected org.apache.lucene.analysis.Analyzer getAnalyzer(org.hibernate.annotations.common.reflection.XAnnotatedElement annotatedElement,
InitContext context)
getAnalyzer
protected org.apache.lucene.analysis.Analyzer getAnalyzer(Analyzer analyzerAnn,
InitContext context)
getSimilarity
public org.apache.lucene.search.Similarity getSimilarity()
checkDocumentId
protected void checkDocumentId(org.hibernate.annotations.common.reflection.XProperty member,
DocumentBuilderContainedEntity.PropertiesMetadata propertiesMetadata,
boolean isRoot,
java.lang.String prefix,
InitContext context)
getIdAttributeName
protected java.lang.String getIdAttributeName(org.hibernate.annotations.common.reflection.XProperty member,
java.lang.annotation.Annotation idAnnotation)
- Determines the property name for the document id. It is either the name of the property itself or the
value of the name attribute of the
idAnnotation
.
- Parameters:
member
- the property used as id property.idAnnotation
- the id annotation
- Returns:
- property name to be used as document id.
getBoost
protected java.lang.Float getBoost(org.hibernate.annotations.common.reflection.XProperty member,
Field fieldAnn)
getDynamicBoost
protected BoostStrategy getDynamicBoost(org.hibernate.annotations.common.reflection.XProperty member)
getTermVector
protected org.apache.lucene.document.Field.TermVector getTermVector(TermVector vector)
getIndex
protected org.apache.lucene.document.Field.Index getIndex(Index index)
getBoost
protected float getBoost(org.hibernate.annotations.common.reflection.XClass element)
getDynamicBoost
protected BoostStrategy getDynamicBoost(org.hibernate.annotations.common.reflection.XClass element)
addWorkToQueue
public void addWorkToQueue(java.lang.Class<T> entityClass,
T entity,
java.io.Serializable id,
WorkType workType,
java.util.List<LuceneWork> queue,
SearchFactoryImplementor searchFactoryImplementor)
getAnalyzer
public org.apache.lucene.analysis.Analyzer getAnalyzer()
postInitialize
public void postInitialize(java.util.Set<java.lang.Class<?>> indexedClasses)
getEntityState
public EntityState getEntityState()
getMappedSubclasses
public java.util.Set<java.lang.Class<?>> getMappedSubclasses()
Copyright © 2006-2010 Hibernate. All Rights Reserved.