Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.search.event
Class FullTextIndexEventListener

    java.lang.Object
      org.hibernate.search.event.FullTextIndexEventListener

All Implemented Interfaces:
  java.io.Serializable, org.hibernate.event.Destructible, org.hibernate.event.FlushEventListener, org.hibernate.event.Initializable, org.hibernate.event.PostCollectionRecreateEventListener, org.hibernate.event.PostCollectionRemoveEventListener, org.hibernate.event.PostCollectionUpdateEventListener, org.hibernate.event.PostDeleteEventListener, org.hibernate.event.PostInsertEventListener, org.hibernate.event.PostUpdateEventListener

Direct Known Subclasses:
  FullTextIndexCollectionEventListener

    public class FullTextIndexEventListener

extends java.lang.Object
implements org.hibernate.event.PostDeleteEventListener, org.hibernate.event.PostInsertEventListener, org.hibernate.event.PostUpdateEventListener, org.hibernate.event.PostCollectionRecreateEventListener, org.hibernate.event.PostCollectionRemoveEventListener, org.hibernate.event.PostCollectionUpdateEventListener, org.hibernate.event.FlushEventListener, org.hibernate.event.Initializable, org.hibernate.event.Destructible

This listener supports setting a parent directory for all generated index files. It also supports setting the analyzer class to be used.

Author:
  Gavin King, Emmanuel Bernard, Mattias Arbin, Sanne Grinovero
See Also:
  Serialized Form

Field Summary
`protected SearchFactoryImplementor` | `searchFactoryImplementor`
`protected boolean` | `used`

Constructor Summary
`FullTextIndexEventListener()`

Method Summary
`void` | `addSynchronization(org.hibernate.event.EventSource eventSource, javax.transaction.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.
`void` | `cleanup()`
`SearchFactoryImplementor` | `getSearchFactoryImplementor()`
`void` | `initialize(org.hibernate.cfg.Configuration cfg)` Initialize method called by Hibernate Core when the SessionFactory starts
`void` | `onFlush(org.hibernate.event.FlushEvent event)` Make sure the indexes are updated right after the hibernate flush, avoiding object loading during a flush.
`void` | `onPostDelete(org.hibernate.event.PostDeleteEvent event)`
`void` | `onPostInsert(org.hibernate.event.PostInsertEvent event)`
`void` | `onPostRecreateCollection(org.hibernate.event.PostCollectionRecreateEvent event)`
`void` | `onPostRemoveCollection(org.hibernate.event.PostCollectionRemoveEvent event)`
`void` | `onPostUpdate(org.hibernate.event.PostUpdateEvent event)`
`void` | `onPostUpdateCollection(org.hibernate.event.PostCollectionUpdateEvent event)`
`protected void` | `processCollectionEvent(org.hibernate.event.AbstractCollectionEvent event)`
`protected
`<T> void`
` | `processWork(T entity, java.io.Serializable id, WorkType workType, org.hibernate.event.AbstractEvent event)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### used

    protected boolean used

### searchFactoryImplementor

    protected SearchFactoryImplementor searchFactoryImplementor

Constructor Detail

### FullTextIndexEventListener

    public FullTextIndexEventListener()

Method Detail

### initialize

    public void initialize(org.hibernate.cfg.Configuration cfg)

  Initialize method called by Hibernate Core when the SessionFactory starts

  Specified by:
    `initialize` in interface `org.hibernate.event.Initializable`

### getSearchFactoryImplementor

    public SearchFactoryImplementor getSearchFactoryImplementor()

### onPostDelete

    public void onPostDelete(org.hibernate.event.PostDeleteEvent event)

  Specified by:
    `onPostDelete` in interface `org.hibernate.event.PostDeleteEventListener`

### onPostInsert

    public void onPostInsert(org.hibernate.event.PostInsertEvent event)

  Specified by:
    `onPostInsert` in interface `org.hibernate.event.PostInsertEventListener`

### onPostUpdate

    public void onPostUpdate(org.hibernate.event.PostUpdateEvent event)

  Specified by:
    `onPostUpdate` in interface `org.hibernate.event.PostUpdateEventListener`

### processWork

    protected <T> void processWork(T entity,
                                   java.io.Serializable id,
                                   WorkType workType,
                                   org.hibernate.event.AbstractEvent event)

### cleanup

    public void cleanup()

  Specified by:
    `cleanup` in interface `org.hibernate.event.Destructible`

### onPostRecreateCollection

    public void onPostRecreateCollection(org.hibernate.event.PostCollectionRecreateEvent event)

  Specified by:
    `onPostRecreateCollection` in interface `org.hibernate.event.PostCollectionRecreateEventListener`

### onPostRemoveCollection

    public void onPostRemoveCollection(org.hibernate.event.PostCollectionRemoveEvent event)

  Specified by:
    `onPostRemoveCollection` in interface `org.hibernate.event.PostCollectionRemoveEventListener`

### onPostUpdateCollection

    public void onPostUpdateCollection(org.hibernate.event.PostCollectionUpdateEvent event)

  Specified by:
    `onPostUpdateCollection` in interface `org.hibernate.event.PostCollectionUpdateEventListener`

### processCollectionEvent

    protected void processCollectionEvent(org.hibernate.event.AbstractCollectionEvent event)

### onFlush

    public void onFlush(org.hibernate.event.FlushEvent event)

  Make sure the indexes are updated right after the hibernate flush, avoiding object loading during a flush. Not needed during transactions.

  Specified by:
    `onFlush` in interface `org.hibernate.event.FlushEventListener`

### addSynchronization

    public void addSynchronization(org.hibernate.event.EventSource eventSource,
                                   javax.transaction.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. Warning: if the synchronization contains a hard reference to the Session proper cleanup is not guaranteed and memory leaks will happen.

  Parameters:
    `eventSource` - should be the Session doing the flush
    `synchronization` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 Hibernate. All Rights Reserved.