org.hibernate.search.indexes.interceptor

## Class DontInterceptEntityInterceptor

- java.lang.Object
- - org.hibernate.search.indexes.interceptor.DontInterceptEntityInterceptor

- All Implemented Interfaces:
    EntityIndexingInterceptor

      public class DontInterceptEntityInterceptor
      extends Object
      implements EntityIndexingInterceptor

  Do not apply any interception. Useful to force a subclass not to inherit its superclass interceptor.
  Author:
    Emmanuel Bernard

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DontInterceptEntityInterceptor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexingOverride` | `onAdd(Object entity)` Triggered when an entity instance T should be added to the index, either by an event listener or by the MassIndexer.
    `IndexingOverride` | `onCollectionUpdate(Object entity)` A CollectionUpdate event is fired on collections included in an indexed entity, for example when using `IndexedEmbedded` This event is triggered on each indexed domain instance T contained in such a collection; this is generally similar to a `EntityIndexingInterceptor.onUpdate(Object)` event.
    `IndexingOverride` | `onDelete(Object entity)` Triggered when an entity instance T should be deleted from the index.
    `IndexingOverride` | `onUpdate(Object entity)` Triggered when an entity instance T should be updated in the index.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DontInterceptEntityInterceptor

          public DontInterceptEntityInterceptor()

  - ### Method Detail

    - #### onAdd

          public IndexingOverride onAdd(Object entity)

      Description copied from interface: `EntityIndexingInterceptor`
      Triggered when an entity instance T should be added to the index, either by an event listener or by the MassIndexer. This is not triggered by an explicit API call such as FullTextSession.index(T).
      Specified by:
        `onAdd` in interface `EntityIndexingInterceptor`
      Parameters:
        `entity` - The entity instance
      Returns:
        Return `IndexingOverride.APPLY_DEFAULT` to have the instance be added to the index as normal; return a different value to override the behaviour.

    - #### onUpdate

          public IndexingOverride onUpdate(Object entity)

      Description copied from interface: `EntityIndexingInterceptor`
      Triggered when an entity instance T should be updated in the index.
      Specified by:
        `onUpdate` in interface `EntityIndexingInterceptor`
      Parameters:
        `entity` - The entity instance
      Returns:
        Return `IndexingOverride.APPLY_DEFAULT` to have the instance removed and re-added to the index as normal; return a different value to override the behaviour.

    - #### onDelete

          public IndexingOverride onDelete(Object entity)

      Description copied from interface: `EntityIndexingInterceptor`
      Triggered when an entity instance T should be deleted from the index.
      Specified by:
        `onDelete` in interface `EntityIndexingInterceptor`
      Parameters:
        `entity` - The entity instance
      Returns:
        Return `IndexingOverride.APPLY_DEFAULT` to have the instance removed from the index as normal; return a different value to override the behaviour.

    - #### onCollectionUpdate

          public IndexingOverride onCollectionUpdate(Object entity)

      Description copied from interface: `EntityIndexingInterceptor`
      A CollectionUpdate event is fired on collections included in an indexed entity, for example when using `IndexedEmbedded` This event is triggered on each indexed domain instance T contained in such a collection; this is generally similar to a `EntityIndexingInterceptor.onUpdate(Object)` event.
      Specified by:
        `onCollectionUpdate` in interface `EntityIndexingInterceptor`
      Parameters:
        `entity` - The entity instance
      Returns:
        Return `IndexingOverride.APPLY_DEFAULT` to have the instance removed and re-added to the index as normal; return a different value to override the behaviour.

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved