public final class FullTextIndexEventListener extends Object implements PostDeleteEventListener, PostInsertEventListener, PostUpdateEventListener, PostCollectionRecreateEventListener, PostCollectionRemoveEventListener, PostCollectionUpdateEventListener, FlushEventListener, Serializable
Constructor and Description |
---|
FullTextIndexEventListener() |
Modifier and Type | Method and Description |
---|---|
void |
addSynchronization(EventSource eventSource,
Synchronization synchronization)
Adds a synchronization to be performed in the onFlush method;
should only be used as workaround for the case a flush is happening
out of transaction.
|
String[] |
getDirtyPropertyNames(PostUpdateEvent event) |
protected org.hibernate.search.engine.spi.AbstractDocumentBuilder |
getDocumentBuilder(Object instance)
It is not suggested to extend FullTextIndexEventListener, but when needed to implement special
use cases implementors might need this method.
|
org.hibernate.search.engine.integration.impl.ExtendedSearchIntegrator |
getExtendedSearchFactoryIntegrator() |
void |
initialize(org.hibernate.search.engine.integration.impl.ExtendedSearchIntegrator extendedIntegrator)
Initialize method called by Hibernate Core when the SessionFactory starts.
|
void |
onFlush(FlushEvent event)
Make sure the indexes are updated right after the hibernate flush,
avoiding object loading during a flush.
|
void |
onPostDelete(PostDeleteEvent event) |
void |
onPostInsert(PostInsertEvent event) |
void |
onPostRecreateCollection(PostCollectionRecreateEvent event) |
void |
onPostRemoveCollection(PostCollectionRemoveEvent event) |
void |
onPostUpdate(PostUpdateEvent event) |
void |
onPostUpdateCollection(PostCollectionUpdateEvent event) |
protected void |
processCollectionEvent(AbstractCollectionEvent event) |
protected void |
processWork(String tenantIdentifier,
Object entity,
Serializable id,
org.hibernate.search.backend.spi.WorkType workType,
AbstractEvent event,
boolean identifierRollbackEnabled) |
boolean |
requiresPostCommitHanding(EntityPersister persister)
Required since Hibernate ORM 4.3
|
public void onPostDelete(PostDeleteEvent event)
onPostDelete
in interface PostDeleteEventListener
public void onPostInsert(PostInsertEvent event)
onPostInsert
in interface PostInsertEventListener
public void onPostUpdate(PostUpdateEvent event)
onPostUpdate
in interface PostUpdateEventListener
public void onPostRecreateCollection(PostCollectionRecreateEvent event)
onPostRecreateCollection
in interface PostCollectionRecreateEventListener
public void onPostRemoveCollection(PostCollectionRemoveEvent event)
onPostRemoveCollection
in interface PostCollectionRemoveEventListener
public void onPostUpdateCollection(PostCollectionUpdateEvent event)
onPostUpdateCollection
in interface PostCollectionUpdateEventListener
public void onFlush(FlushEvent event)
onFlush
in interface FlushEventListener
event
- The flush event to be handled.public org.hibernate.search.engine.integration.impl.ExtendedSearchIntegrator getExtendedSearchFactoryIntegrator()
public String[] getDirtyPropertyNames(PostUpdateEvent event)
public void initialize(org.hibernate.search.engine.integration.impl.ExtendedSearchIntegrator extendedIntegrator)
extendedIntegrator
- the ExtendedSearchIntegrator
public void addSynchronization(EventSource eventSource, Synchronization synchronization)
eventSource
- should be the Session doing the flushsynchronization
- the synchronisation instanceprotected void processWork(String tenantIdentifier, Object entity, Serializable id, org.hibernate.search.backend.spi.WorkType workType, AbstractEvent event, boolean identifierRollbackEnabled)
protected void processCollectionEvent(AbstractCollectionEvent event)
protected org.hibernate.search.engine.spi.AbstractDocumentBuilder getDocumentBuilder(Object instance)
instance
- the object instance for which to retrieve the document builderDocumentBuilder
for the specified objectpublic boolean requiresPostCommitHanding(EntityPersister persister)
requiresPostCommitHanding
in interface PostDeleteEventListener
requiresPostCommitHanding
in interface PostInsertEventListener
requiresPostCommitHanding
in interface PostUpdateEventListener
persister
- The persister for the entity in question.true
if after transaction callbacks should be added.Copyright © 2016 JBoss by Red Hat. All rights reserved.