Class InfinispanMapping

java.lang.Object
org.hibernate.search.mapper.pojo.mapping.spi.AbstractPojoMappingImplementor<SearchMapping>
org.infinispan.search.mapper.mapping.impl.InfinispanMapping
All Implemented Interfaces:
AutoCloseable, org.hibernate.search.engine.backend.common.spi.EntityReferenceFactory<EntityReference>, org.hibernate.search.engine.backend.mapping.spi.BackendMappingContext, org.hibernate.search.engine.mapper.mapping.spi.MappingImplementor<SearchMapping>, org.hibernate.search.mapper.pojo.bridge.runtime.spi.BridgeMappingContext, org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexingMappingContext, org.hibernate.search.mapper.pojo.scope.spi.PojoScopeMappingContext, org.hibernate.search.mapper.pojo.session.spi.PojoSearchSessionMappingContext, org.hibernate.search.mapper.pojo.work.spi.PojoWorkMappingContext, SearchMapping, InfinispanSearchSessionMappingContext

public class InfinispanMapping extends org.hibernate.search.mapper.pojo.mapping.spi.AbstractPojoMappingImplementor<SearchMapping> implements SearchMapping, InfinispanSearchSessionMappingContext, org.hibernate.search.engine.backend.common.spi.EntityReferenceFactory<EntityReference>
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface SearchMapping
    • isClose

      public boolean isClose()
      Specified by:
      isClose in interface SearchMapping
    • scope

      public <E> SearchScope<E> scope(Collection<? extends Class<? extends E>> targetedTypes)
      Description copied from interface: SearchMapping
      Create a SearchScope limited to the given types.
      Specified by:
      scope in interface SearchMapping
      Type Parameters:
      E - An entity to include in the scope.
      Parameters:
      targetedTypes - A collection of types to include in the scope.
      Returns:
      The created scope.
      See Also:
    • scopeAll

      public SearchScope<?> scopeAll()
      Specified by:
      scopeAll in interface SearchMapping
    • getMappingSession

      public SearchSession getMappingSession()
      Specified by:
      getMappingSession in interface SearchMapping
    • getSearchIndexer

      public SearchIndexer getSearchIndexer()
      Specified by:
      getSearchIndexer in interface SearchMapping
    • indexedEntity

      public SearchIndexedEntity indexedEntity(Class<?> entityType)
      Specified by:
      indexedEntity in interface SearchMapping
      Parameters:
      entityType - The type of an possible-indexed entity.
      Returns:
      A SearchIndexedEntity for the indexed entity with the exact given type, if the type matches some indexed entity, otherwise null.
    • indexedEntity

      public SearchIndexedEntity indexedEntity(String entityName)
      Specified by:
      indexedEntity in interface SearchMapping
    • allIndexedEntities

      public Collection<? extends SearchIndexedEntity> allIndexedEntities()
      Specified by:
      allIndexedEntities in interface SearchMapping
      Returns:
      A collection containing one SearchIndexedEntity for each indexed entity
    • allIndexedEntityNames

      public Set<String> allIndexedEntityNames()
      Specified by:
      allIndexedEntityNames in interface SearchMapping
      Returns:
      A set containing the name of all indexed entities.
    • allIndexedEntityJavaClasses

      public Set<Class<?>> allIndexedEntityJavaClasses()
      Specified by:
      allIndexedEntityJavaClasses in interface SearchMapping
    • toConvertedEntityJavaClass

      public Class<?> toConvertedEntityJavaClass(Object value)
      Specified by:
      toConvertedEntityJavaClass in interface SearchMapping
      Parameters:
      value - An entity.
      Returns:
      The internal Java class for this entity after conversion, i.e. the Java class that will be returned by SearchMapping.allIndexedEntityJavaClasses() if this entity is potentially indexed. In practice, this is only useful to handle protobuf type: if an instance of ProtobufValueWrapper is passed, this will return byte[] because that's the type we use for protobuf values internally. For all other types, this just returns value.getClass().
      See Also:
    • metamodel

      public Map<String,IndexMetamodel> metamodel()
      Specified by:
      metamodel in interface SearchMapping
    • getFailureHandler

      public org.hibernate.search.engine.reporting.FailureHandler getFailureHandler()
      Specified by:
      getFailureHandler in interface SearchMapping
    • createScope

      public <E> SearchScopeImpl<E> createScope(Collection<? extends Class<? extends E>> classes)
      Specified by:
      createScope in interface InfinispanSearchSessionMappingContext
    • createScope

      public <E> SearchScopeImpl<E> createScope(Class<E> expectedSuperType, Collection<String> entityNames)
      Specified by:
      createScope in interface InfinispanSearchSessionMappingContext
    • toConcreteType

      public SearchMapping toConcreteType()
      Specified by:
      toConcreteType in interface org.hibernate.search.engine.mapper.mapping.spi.MappingImplementor<SearchMapping>
    • entityReferenceFactory

      public org.hibernate.search.engine.backend.common.spi.EntityReferenceFactory<EntityReference> entityReferenceFactory()
      Specified by:
      entityReferenceFactory in interface org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexingMappingContext
      Specified by:
      entityReferenceFactory in interface org.hibernate.search.mapper.pojo.work.spi.PojoWorkMappingContext
    • threadPoolProvider

      public org.hibernate.search.engine.environment.thread.spi.ThreadPoolProvider threadPoolProvider()
      Specified by:
      threadPoolProvider in interface org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexingMappingContext
    • failureHandler

      public org.hibernate.search.engine.reporting.FailureHandler failureHandler()
      Specified by:
      failureHandler in interface org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexingMappingContext
    • createMassIndexerAgent

      public org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexerAgent createMassIndexerAgent(org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexerAgentCreateContext context)
      Specified by:
      createMassIndexerAgent in interface org.hibernate.search.mapper.pojo.massindexing.spi.PojoMassIndexingMappingContext
    • createEntityReference

      public EntityReference createEntityReference(String typeName, Object identifier)
      Specified by:
      createEntityReference in interface org.hibernate.search.engine.backend.common.spi.EntityReferenceFactory<EntityReference>
    • getIntegration

      public org.hibernate.search.engine.common.spi.SearchIntegration getIntegration()
    • setIntegration

      public void setIntegration(org.hibernate.search.engine.common.spi.SearchIntegration integration)