org.hibernate.search.annotations

## Annotation Type ContainedIn

-     @Retention(value=RUNTIME)
       @Target(value={FIELD,METHOD})
       @Documented
      public @interface ContainedIn

  Describe the owning entity as being part of the target entity's indexed object graph.

  Often used when an `@Indexed` class is used as a `IndexedEmbedded` target class. `@ContainedIn` must mark the property pointing back to the `@IndexedEmbedded` owning Entity (not necessary if the class is an `Embeddable` class).

  Also used to trigger a reindex of related entities even if no `@IndexedEmbedded` is involved, allowing to define a dependency graph.

        @Indexed
       public class OrderLine {
            @IndexedEmbedded
           private Order order;
       }

        @Indexed
       public class Order {
            @ContainedIn
           Set <OrderLine> lines;
       }

  Author:
    Emmanuel Bernard
  See Also:
    `Indexed`, `IndexedEmbedded`

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