|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.search.engine.spi.AbstractDocumentBuilder<T>
public abstract class AbstractDocumentBuilder<T>
Abstract base class for the document builders.
| Field Summary | |
|---|---|
protected EntityState |
entityState
|
| Constructor Summary | |
|---|---|
AbstractDocumentBuilder(org.hibernate.annotations.common.reflection.XClass xClass,
ConfigContext configContext,
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 | |
|---|---|
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 |
boolean |
collectionChangeRequiresIndexUpdate(String collectionRoleName)
Returns true if the collection event is going to affect the index state. |
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. |
protected InstanceInitializer |
getInstanceInitializer()
|
Set<Class<?>> |
getMappedSubclasses()
|
TypeMetadata |
getMetadata()
|
org.apache.lucene.search.Similarity |
getSimilarity()
|
TypeMetadata |
getTypeMetadata()
|
boolean |
isCollectionRoleExcluded(String collectionRole)
Deprecated. Use collectionChangeRequiresIndexUpdate(String) instead |
boolean |
isDirty(String[] dirtyPropertyNames)
Hibernate entities might be dirty (their state has changed), but none of these changes would effect the the index state. |
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 EntityState entityState
| Constructor Detail |
|---|
public AbstractDocumentBuilder(org.hibernate.annotations.common.reflection.XClass xClass,
ConfigContext configContext,
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 builderconfigContext - 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 optimizationsinstanceInitializer - a InstanceInitializer object.| Method Detail |
|---|
public abstract void addWorkToQueue(Class<T> entityClass,
T entity,
Serializable id,
boolean delete,
boolean add,
List<LuceneWork> queue,
ConversionContext contextualBridge)
public abstract Serializable getId(Object entity)
entity - the instance for which to retrieve the id
IllegalStateException - when used with a @ProvidedId annotated entitypublic TypeMetadata getTypeMetadata()
public boolean isRoot()
public Class<?> getBeanClass()
public org.hibernate.annotations.common.reflection.XClass getBeanXClass()
public TypeMetadata getMetadata()
public org.apache.lucene.search.Similarity getSimilarity()
public ScopedAnalyzer getAnalyzer()
public EntityState getEntityState()
public Set<Class<?>> getMappedSubclasses()
public void postInitialize(Set<Class<?>> indexedClasses)
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 InstanceInitializer getInstanceInitializer()
public boolean isDirty(String[] dirtyPropertyNames)
true if any of changed entity properties identified
by their names (dirtyPropertyNames) will effect the index state.
dirtyPropertyNames - array of property names for the changed entity properties, null in case the
changed properties cannot be specified.
true if the entity changes will effect the index state, false otherwisepublic boolean requiresProvidedId()
public boolean isIdMatchingJpaId()
public boolean collectionChangeRequiresIndexUpdate(String collectionRoleName)
true if the collection event is going to affect the index state. In this case
the indexing event can be ignored. false otherwise.
collectionRoleName - a String object.
true if an update to the collection identified by the given role name effects the index
state, false otherwise.public boolean isCollectionRoleExcluded(String collectionRole)
collectionChangeRequiresIndexUpdate(String) instead
public void forceStateInspectionOptimizationsDisabled()
isCollectionRoleExcluded(String)public void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||