Interface PojoImplicitReindexingResolver<T>

  • Type Parameters:
    T - The type of entities this object is able to handle.
    All Superinterfaces:
    AutoCloseable, ToStringTreeAppendable
    All Known Implementing Classes:
    PojoImplicitReindexingResolverImpl

    public interface PojoImplicitReindexingResolver<T>
    extends AutoCloseable, ToStringTreeAppendable
    An object responsible for resolving the set of entities that should be reindexed when a given entity changes.

    This includes telling whether changes require the changed entity to be reindexed, but also retrieving all entities that use the changed entity in their indexed form so that they can be reindexed by Hibernate Search.

    • Method Detail

      • dirtySelfFilter

        PojoPathFilter dirtySelfFilter()
        Returns:
        A path filter that only accepts paths whose dirtiness would require reindexing the dirty entity.
      • dirtySelfOrContainingFilter

        PojoPathFilter dirtySelfOrContainingFilter()
        Returns:
        A path filter that only accepts paths whose dirtiness would require reindexing the dirty entity OR an associated entity that contains it.
      • resolveEntitiesToReindex

        void resolveEntitiesToReindex​(PojoReindexingCollector collector,
                                      T dirty,
                                      PojoImplicitReindexingResolverRootContext context)
        Adds all entities that should be reindexed to collector, taking into account the given "dirty entity" and the context describing its "dirtiness".
        Parameters:
        collector - A collector for dirty entities that should be reindexed.
        dirty - The entity whose dirtiness is to be checked.
        context - A context related to the entity root