public interface PojoAdditionalMetadataCollectorTypeNode extends PojoAdditionalMetadataCollector
| Modifier and Type | Method and Description |
|---|---|
PojoRawTypeIdentifier<?> |
getTypeIdentifier() |
PojoAdditionalMetadataCollectorEntityTypeNode |
markAsEntity(String entityName,
PojoPathFilterFactory<Set<String>> pathFilterFactory)
Mark this type as an entity type.
|
PojoAdditionalMetadataCollectorIndexedTypeNode |
markAsIndexed(Optional<String> backendName,
Optional<String> indexName)
Mark this type as an indexed type.
|
PojoAdditionalMetadataCollectorPropertyNode |
property(String propertyName) |
getFailureCollectorPojoRawTypeIdentifier<?> getTypeIdentifier()
PojoAdditionalMetadataCollectorEntityTypeNode markAsEntity(String entityName, PojoPathFilterFactory<Set<String>> pathFilterFactory)
WARNING: entity types must always be defined upfront without relying on
metadata discovery,
because Hibernate Search needs to be able to have a complete view of all the possible entity types
in order to handle automatic reindexing.
Relying on type discovery for entity detection would mean running the risk of one particular
entity subtype not being detected (because only its supertype is mentioned in the schema of indexed entities),
which could result in incomplete automatic reindexing.
entityName - The name of this entity type.pathFilterFactory - The path filter factory for this entity type,
i.e. the object allowing to create path filters that will be used in particular
when performing dirty checking during automatic reindexing.PojoAdditionalMetadataCollectorEntityTypeNode, allowing to provide optional metadata
about the entity.PojoTypeAdditionalMetadata.isEntity()PojoAdditionalMetadataCollectorIndexedTypeNode markAsIndexed(Optional<String> backendName, Optional<String> indexName)
WARNING: only entity types may be indexed.
backendName - The name of the backend where this type should be indexed,
or Optional.empty() to target the default backend.indexName - The name of the index where this type should be indexed,
or Optional.empty() to derive the index name from the entity type.PojoAdditionalMetadataCollectorIndexedTypeNode, allowing to provide optional metadata
about the indexed type.PojoAdditionalMetadataCollectorPropertyNode property(String propertyName)
Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.