|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.search.engine.spi.AbstractDocumentBuilder<T>
public abstract class AbstractDocumentBuilder<T>
Abstract base class for the document builders.
Nested Class Summary | |
---|---|
static class |
AbstractDocumentBuilder.PropertiesMetadata
Wrapper class containing all the meta data extracted out of a single entity. |
Field Summary | |
---|---|
protected Class<?> |
beanClass
|
protected String |
beanXClassName
|
protected Set<String> |
containedInCollectionRoles
|
protected EntityState |
entityState
|
protected Set<String> |
fieldCollectionRoles
|
protected Set<String> |
indexedEmbeddedCollectionRoles
|
protected InstanceInitializer |
instanceInitalizer
|
protected AbstractDocumentBuilder.PropertiesMetadata |
metadata
|
protected org.hibernate.annotations.common.reflection.ReflectionManager |
reflectionManager
|
Constructor Summary | |
---|---|
AbstractDocumentBuilder(org.hibernate.annotations.common.reflection.XClass xClass,
ConfigContext context,
org.apache.lucene.search.Similarity similarity,
org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager,
Set<org.hibernate.annotations.common.reflection.XClass> optimizationBlackList,
InstanceInitializer instanceInitializer)
Constructor. |
Method Summary | |
---|---|
protected void |
addToScopedAnalyzer(String fieldName,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.document.Field.Index index)
|
abstract void |
addWorkToQueue(Class<T> entityClass,
T entity,
Serializable id,
boolean delete,
boolean add,
List<LuceneWork> queue,
ConversionContext contextualBridge)
|
void |
appendContainedInWorkForInstance(Object instance,
WorkPlan workplan,
DepthValidator currentDepth)
If we have a work instance we have to check whether the instance to be indexed is contained in any other indexed entities. |
void |
close()
Closes any resource |
protected abstract void |
documentBuilderSpecificChecks(org.hibernate.annotations.common.reflection.XProperty member,
AbstractDocumentBuilder.PropertiesMetadata propertiesMetadata,
boolean isRoot,
String prefix,
ConfigContext context,
org.hibernate.search.engine.spi.AbstractDocumentBuilder.PathsContext pathsContext)
|
void |
forceStateInspectionOptimizationsDisabled()
Makes sure isCollectionRoleExcluded will always return false, so that collection update events are always processed. |
ScopedAnalyzer |
getAnalyzer()
|
Class<?> |
getBeanClass()
|
org.hibernate.annotations.common.reflection.XClass |
getBeanXClass()
|
EntityState |
getEntityState()
|
abstract Serializable |
getId(Object entity)
In case of an indexed entity, return the value of it's identifier: what is marked as @Id or @DocumentId; in case the entity uses @ProvidedId, it's illegal to call this method. |
Set<Class<?>> |
getMappedSubclasses()
|
AbstractDocumentBuilder.PropertiesMetadata |
getMetadata()
|
protected Integer |
getPrecisionStep(NumericField numericFieldAnn)
|
org.apache.lucene.search.Similarity |
getSimilarity()
|
boolean |
isCollectionRoleExcluded(String collectionRole)
Returns true if the collection event is not going to affect the index state, so that the indexing event can be skipped. |
boolean |
isDirty(String[] dirtyPropertyNames)
Hibernate entities might be considered dirty, but still have only changes that don't affect indexing. |
boolean |
isIdMatchingJpaId()
To be removed, see org.hibernate.search.engine.DocumentBuilderIndexedEntity.isIdMatchingJpaId() |
boolean |
isRoot()
|
void |
postInitialize(Set<Class<?>> indexedClasses)
|
boolean |
requiresProvidedId()
To be removed, see org.hibernate.search.engine.DocumentBuilderIndexedEntity.isIdMatchingJpaId() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String beanXClassName
protected final Class<?> beanClass
protected final InstanceInitializer instanceInitalizer
protected final Set<String> fieldCollectionRoles
protected final Set<String> indexedEmbeddedCollectionRoles
protected final Set<String> containedInCollectionRoles
protected final AbstractDocumentBuilder.PropertiesMetadata metadata
protected EntityState entityState
protected org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager
Constructor Detail |
---|
public AbstractDocumentBuilder(org.hibernate.annotations.common.reflection.XClass xClass, ConfigContext context, org.apache.lucene.search.Similarity similarity, org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager, Set<org.hibernate.annotations.common.reflection.XClass> optimizationBlackList, InstanceInitializer instanceInitializer)
xClass
- The class for which to build a document buildercontext
- Handle to default configuration settingssimilarity
- The index level similarityreflectionManager
- Reflection manager to use for processing the annotationsoptimizationBlackList
- keeps track of types on which we need to disable collection events optimizationsMethod Detail |
---|
public abstract void addWorkToQueue(Class<T> entityClass, T entity, Serializable id, boolean delete, boolean add, List<LuceneWork> queue, ConversionContext contextualBridge)
protected abstract void documentBuilderSpecificChecks(org.hibernate.annotations.common.reflection.XProperty member, AbstractDocumentBuilder.PropertiesMetadata propertiesMetadata, boolean isRoot, String prefix, ConfigContext context, org.hibernate.search.engine.spi.AbstractDocumentBuilder.PathsContext pathsContext)
public abstract Serializable getId(Object entity)
entity
- the instance for which to retrieve the id
IllegalStateException
- when used with a @ProvidedId annotated entitypublic boolean isRoot()
public Class<?> getBeanClass()
public org.hibernate.annotations.common.reflection.XClass getBeanXClass()
public AbstractDocumentBuilder.PropertiesMetadata getMetadata()
public org.apache.lucene.search.Similarity getSimilarity()
public ScopedAnalyzer getAnalyzer()
public EntityState getEntityState()
public Set<Class<?>> getMappedSubclasses()
public void postInitialize(Set<Class<?>> indexedClasses)
protected void addToScopedAnalyzer(String fieldName, org.apache.lucene.analysis.Analyzer analyzer, org.apache.lucene.document.Field.Index index)
public void appendContainedInWorkForInstance(Object instance, WorkPlan workplan, DepthValidator currentDepth)
instance
- the instance to be indexedworkplan
- the current work plancurrentDepth
- the current DepthValidator
object used to check the graph traversalprotected Integer getPrecisionStep(NumericField numericFieldAnn)
public boolean isDirty(String[] dirtyPropertyNames)
dirtyPropertyNames
- Contains the property name of each value which changed, or null for everything.
public boolean requiresProvidedId()
public boolean isIdMatchingJpaId()
public boolean isCollectionRoleExcluded(String collectionRole)
collectionRole
-
public void forceStateInspectionOptimizationsDisabled()
isCollectionRoleExcluded(String)
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |