Class PojoEntityReference

  • All Implemented Interfaces:
    EntityReference

    public final class PojoEntityReference
    extends Object
    implements EntityReference
    A simple, default implementation for EntityReference for POJO-based mappers.

    Should be used instead of custom implementations, whose support is going to be removed in the future.

    • Method Detail

      • type

        public Class<?> type()
        Specified by:
        type in interface EntityReference
        Returns:
        The type of the referenced entity.
      • id

        public Object id()
        Specified by:
        id in interface EntityReference
        Returns:
        The identifier of the referenced entity for Hibernate Search. This is the value of the property used to generate the document ID, which is generally also the entity ID (though depending on the mapping this may be another unique property).
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object