org.hibernate.search.cfg.spi

## Interface IdUniquenessResolver

- All Superinterfaces:
    Service
  All Known Implementing Classes:
    DefaultIdUniquenessResolver, HibernateCoreIdUniquenessResolver

      public interface IdUniquenessResolver
      extends Service

  Contract checking that two given classes cannot share the same identifier and be two different instances in the underlying datastore (or event provider). In the case of Hibernate ORM, the two classes would enforce id uniqueness when they share the same mapped class hierarchy as ORM enforces one id definition per class hierarchy amongst mapped classes. This `Service` can be provided by the `SearchConfiguration` implementor when it has such knowledge. If no `IdUniquenessResolver` is enlisted as provided service, then it is assumed that uniqueness cannot be guaranteed. This contract is used by Hibernate Search to decide whether it can optimize delete operations on a given index or not.
  Author:
    Emmanuel Bernard <emmanuel@hibernate.org>

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `areIdsUniqueForClasses(IndexedTypeIdentifier firstEntity, IndexedTypeIdentifier secondEntity)` Returns `true` if the same identifier value cannot be shared between two class instances of `entityInIndex` and `otherEntityInIndex`.

- - ### Method Detail

    - #### areIdsUniqueForClasses

          boolean areIdsUniqueForClasses(IndexedTypeIdentifier firstEntity,
                                         IndexedTypeIdentifier secondEntity)

      Returns `true` if the same identifier value cannot be shared between two class instances of `entityInIndex` and `otherEntityInIndex`.
      Parameters:
        `firstEntity` - one entity type
        `secondEntity` - the other entity type
      Returns:
        `true` if the same identifier value cannot be share between two class instances of `entityInIndex` and `otherEntityInIndex`

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