Annotation Type Embedded


@Documented @Repeatable(List.class) @Target({METHOD,FIELD}) @Retention(RUNTIME) @PropertyMapping(processor=@PropertyMappingAnnotationProcessorRef(type=EmbeddedProcessor.class,retrieval=CONSTRUCTOR)) public @interface Embedded
Maps a property to an object field whose fields are the same as those defined in the property type.

This allows search queries on a single index to use data from multiple entities.

To get the original structure, the nested structure must be used, but this has an impact on performance and how queries must be structured.

Simplified version for Infinispan of IndexedEmbedded

Since:
14.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    The number of levels of indexed-embedded that will have all their fields included by default.
     
     
  • Element Details

    • name

      String name
      Returns:
      The name of the object field created to represent this @Embedded. Defaults to the property name.
      Default:
      ""
    • includeDepth

      int includeDepth
      The number of levels of indexed-embedded that will have all their fields included by default.

      includeDepth is the number of `@Embedded` that will be traversed and for which all fields of the indexed-embedded element will be included:

      • includeDepth=0 means fields of the indexed-embedded element are not included, nor is any field of nested indexed-embedded elements.
      • includeDepth=1 means fields of the indexed-embedded element are included, but not fields of nested indexed-embedded elements.
      • And so on.
      The default is 3.
      Returns:
      The number of levels of indexed-embedded that will have all their fields included by default. By default, three levels will be included.
      Default:
      3
    • structure

      Structure structure
      Returns:
      How the structure of the object field created for this indexed-embedded is preserved upon indexing.
      See Also:
      Default:
      NESTED