org.hibernate.search.metadata.impl

## Class IndexedTypeDescriptorImpl

- java.lang.Object
- - org.hibernate.search.metadata.impl.IndexedTypeDescriptorImpl

- All Implemented Interfaces:
    FieldContributor, IndexedTypeDescriptor

      public class IndexedTypeDescriptorImpl
      extends Object
      implements IndexedTypeDescriptor

  Author:
    Hardy Ferentschik

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexedTypeDescriptorImpl(TypeMetadata typeMetadata, Set<IndexManager> indexManagers)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `BoostStrategy` | `getDynamicBoost()` Deprecated.
    `Set<FieldDescriptor>` | `getFieldsForProperty(String propertyName)` Returns the set of index descriptors for the indexed field generated by the property with the given name.
    `Set<IndexDescriptor>` | `getIndexDescriptors()` Returns a set of `IndexDescriptor` instances describing Lucene index information, in particular the index name.
    `FieldDescriptor` | `getIndexedField(String fieldName)` Retrieves the field descriptor for a given field name.
    `Set<FieldDescriptor>` | `getIndexedFields()`
    `Set<PropertyDescriptor>` | `getIndexedProperties()`
    `IndexedTypeIdentifier` | `getIndexedType()`
    `PropertyDescriptor` | `getProperty(String propertyName)` Retrieves the property descriptor for a given property name.
    `float` | `getStaticBoost()` Deprecated.
    `Class<?>` | `getType()`
    `boolean` | `isIndexed()`
    `boolean` | `isSharded()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### IndexedTypeDescriptorImpl

          public IndexedTypeDescriptorImpl(TypeMetadata typeMetadata,
                                           Set<IndexManager> indexManagers)

  - ### Method Detail

    - #### getType

          public Class<?> getType()

      Specified by:
        `getType` in interface `IndexedTypeDescriptor`
      Returns:
        the type for which this descriptor provides meta information

    - #### isIndexed

          public boolean isIndexed()

      Specified by:
        `isIndexed` in interface `IndexedTypeDescriptor`
      Returns:
        `true` if the type for this descriptor is indexed, `false` otherwise

    - #### isSharded

          public boolean isSharded()

      Specified by:
        `isSharded` in interface `IndexedTypeDescriptor`
      Returns:
        `true` is this index is sharded, `false` otherwise

    - #### getStaticBoost

          @Deprecated
          public float getStaticBoost()

      Deprecated.
      Specified by:
        `getStaticBoost` in interface `IndexedTypeDescriptor`
      Returns:
        the class boost value, 1 being the default.

    - #### getDynamicBoost

          @Deprecated
          public BoostStrategy getDynamicBoost()

      Deprecated.
      Specified by:
        `getDynamicBoost` in interface `IndexedTypeDescriptor`
      Returns:
        Dynamic boost strategy. There will always be a boost strategy, but the default strategy will apply a boost of 1.0.

    - #### getIndexDescriptors

          public Set<IndexDescriptor> getIndexDescriptors()

      Description copied from interface: `IndexedTypeDescriptor`
      Returns a set of `IndexDescriptor` instances describing Lucene index information, in particular the index name. The index name can also be used to retrieve the actual `IndexManager` for this index via

             ExtendedSearchIntegrator integrator = ...
             IndexManager indexManager = integrator.getIndexManagerHolder().getIndexManager(String)

      For non sharded indexes there will be only a single `IndexDescriptor`. The empty set is returned for an unindexed type
      Specified by:
        `getIndexDescriptors` in interface `IndexedTypeDescriptor`
      Returns:
        a set of `IndexDescriptor` instances describing Lucene index information
      See Also:
        `ExtendedSearchIntegrator`

    - #### getIndexedProperties

          public Set<PropertyDescriptor> getIndexedProperties()

      Specified by:
        `getIndexedProperties` in interface `IndexedTypeDescriptor`
      Returns:
        the set of indexed properties in form of `PropertyDescriptor`s

    - #### getProperty

          public PropertyDescriptor getProperty(String propertyName)

      Description copied from interface: `IndexedTypeDescriptor`
      Retrieves the property descriptor for a given property name.
      Specified by:
        `getProperty` in interface `IndexedTypeDescriptor`
      Parameters:
        `propertyName` - the property name for which to return descriptor, cannot be `null`
      Returns:
        the property descriptor for the specified property name. `null` is returned in case a property with the specified name does not exist

    - #### getIndexedFields

          public Set<FieldDescriptor> getIndexedFields()

      Specified by:
        `getIndexedFields` in interface `FieldContributor`
      Returns:
        a set of `FieldDescriptor`s for the fields contributed by this element

    - #### getIndexedField

          public FieldDescriptor getIndexedField(String fieldName)

      Description copied from interface: `IndexedTypeDescriptor`
      Retrieves the field descriptor for a given field name.
      Specified by:
        `getIndexedField` in interface `IndexedTypeDescriptor`
      Parameters:
        `fieldName` - the field name for which to return descriptor, cannot be `null`
      Returns:
        the field descriptor for the specified field name. `null` is returned in case a field with the specified name does not exist

    - #### getFieldsForProperty

          public Set<FieldDescriptor> getFieldsForProperty(String propertyName)

      Description copied from interface: `IndexedTypeDescriptor`
      Returns the set of index descriptors for the indexed field generated by the property with the given name.
      Specified by:
        `getFieldsForProperty` in interface `IndexedTypeDescriptor`
      Parameters:
        `propertyName` - the property name, cannot be `null`
      Returns:
        the set of index descriptors for the indexed field generated by the property with the given name. The empty set is returned in case the property does not exist or does not produce any indexed fields.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getIndexedType

          public IndexedTypeIdentifier getIndexedType()

      Specified by:
        `getIndexedType` in interface `IndexedTypeDescriptor`
      Returns:
        the type for which this descriptor provides meta information

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