org.hibernate.search.engine.metadata.impl

## Class AnnotationMetadataProvider

- java.lang.Object
- - org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider

- All Implemented Interfaces:
    MetadataProvider

      public class AnnotationMetadataProvider
      extends Object
      implements MetadataProvider

  A metadata provider which extracts the required information from annotations.
  Author:
    Hardy Ferentschik

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnnotationMetadataProvider(org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager, ConfigContext configContext)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsSearchMetadata(IndexedTypeIdentifier type)`
    `TypeMetadata` | `getTypeMetadataFor(Class<?> clazz, IndexManagerType indexManagerType)` Deprecated.
    `TypeMetadata` | `getTypeMetadataFor(IndexedTypeIdentifier type, IndexManagerType indexManagerType)` Returns the Search related metadata for the specified type.
    `TypeMetadata` | `getTypeMetadataForContainedIn(IndexedTypeIdentifier type)` Returns the `ContainedIn` related metadata for the specified type.

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

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

- - ### Constructor Detail

    - #### AnnotationMetadataProvider

          public AnnotationMetadataProvider(org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager,
                                            ConfigContext configContext)

  - ### Method Detail

    - #### getTypeMetadataForContainedIn

          public TypeMetadata getTypeMetadataForContainedIn(IndexedTypeIdentifier type)

      Description copied from interface: `MetadataProvider`
      Returns the `ContainedIn` related metadata for the specified type.

      The metadata for `ContainedIn` are not comprehensive: they do not contain the information about the FieldBridges, the analyzers or the NullMarkerCodecs.

      We can't build these information because classes only marked with `ContainedIn` are not tied to an `IndexManager`.

      It's of no use for `ContainedIn` resolution anyway.

      Specified by:
        `getTypeMetadataForContainedIn` in interface `MetadataProvider`
      Parameters:
        `type` - The type of interest.
      Returns:
        the `ContainedInTypeMetadata` for the specified type

    - #### getTypeMetadataFor

          public TypeMetadata getTypeMetadataFor(IndexedTypeIdentifier type,
                                                 IndexManagerType indexManagerType)

      Description copied from interface: `MetadataProvider`
      Returns the Search related metadata for the specified type.
      Specified by:
        `getTypeMetadataFor` in interface `MetadataProvider`
      Parameters:
        `type` - The type of interest.
        `indexManagerType` - the `IndexManagerType` type managing this entity type
      Returns:
        the `TypeMetadata` for the specified type

    - #### getTypeMetadataFor

          @Deprecated
          public TypeMetadata getTypeMetadataFor(Class<?> clazz,
                                                             IndexManagerType indexManagerType)

      Deprecated.
      Use `getTypeMetadataFor(IndexedTypeIdentifier, IndexManagerType)` instead.

    - #### containsSearchMetadata

          public boolean containsSearchMetadata(IndexedTypeIdentifier type)

      Specified by:
        `containsSearchMetadata` in interface `MetadataProvider`

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