org.hibernate.search.engine.spi
Class DocumentBuilderContainedEntity<T>
java.lang.Object
org.hibernate.search.engine.spi.AbstractDocumentBuilder<T>
org.hibernate.search.engine.spi.DocumentBuilderContainedEntity<T>
public class DocumentBuilderContainedEntity<T>
- extends AbstractDocumentBuilder<T>
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
Method Summary |
void |
addWorkToQueue(Class<T> entityClass,
T entity,
Serializable id,
boolean delete,
boolean add,
List<LuceneWork> queue,
ConversionContext contextualBridge)
|
protected 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)
|
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. |
Methods inherited from class org.hibernate.search.engine.spi.AbstractDocumentBuilder |
addToScopedAnalyzer, appendContainedInWorkForInstance, close, forceStateInspectionOptimizationsDisabled, getAnalyzer, getBeanClass, getBeanXClass, getEntityState, getMappedSubclasses, getMetadata, getPrecisionStep, getSimilarity, isCollectionRoleExcluded, isDirty, isIdMatchingJpaId, isRoot, postInitialize, requiresProvidedId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentBuilderContainedEntity
public DocumentBuilderContainedEntity(org.hibernate.annotations.common.reflection.XClass xClass,
ConfigContext context,
org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager,
Set<org.hibernate.annotations.common.reflection.XClass> optimizationBlackList,
InstanceInitializer instanceInitializer)
- Constructor used on contained entities not annotated with
@Indexed
themselves.
- Parameters:
xClass
- The class for which to build a DocumentBuilderContainedEntity
.context
- Handle to default configuration settings.reflectionManager
- Reflection manager to use for processing the annotations.optimizationBlackList
- mutable register, keeps track of types on which we need to disable collection events optimizations
documentBuilderSpecificChecks
protected 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)
- Specified by:
documentBuilderSpecificChecks
in class AbstractDocumentBuilder<T>
addWorkToQueue
public void addWorkToQueue(Class<T> entityClass,
T entity,
Serializable id,
boolean delete,
boolean add,
List<LuceneWork> queue,
ConversionContext contextualBridge)
- Specified by:
addWorkToQueue
in class AbstractDocumentBuilder<T>
getId
public Serializable getId(Object entity)
- Description copied from class:
AbstractDocumentBuilder
- 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.
- Specified by:
getId
in class AbstractDocumentBuilder<T>
- Parameters:
entity
- the instance for which to retrieve the id
- Returns:
- the value, or null if it's not an indexed entity
Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved