Interface StandalonePojoMappingConfigurationContext
-
Method Summary
Modifier and TypeMethodDescriptionaddEntityType
(Class<?> type) Deprecated.addEntityType
(Class<?> type, String entityName) Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity().name( entityName )
instead.default <E> StandalonePojoMappingConfigurationContext
addEntityType
(Class<E> type, String entityName, EntityConfigurer<E> configurer) Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity().name( entityName ).loadingBinder( binder )
instead.default <E> StandalonePojoMappingConfigurationContext
addEntityType
(Class<E> type, EntityConfigurer<E> configurer) Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity().loadingBinder( binder )
instead.addEntityTypes
(Class<?>... types) Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity()
for each type instead.addEntityTypes
(Iterable<Class<?>> types) Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity()
for each type instead.Starts the definition of the annotation mapping.bridges()
Starts the definition of bridges to apply by default in mappings.Starts the definition of container extractors available for use in mappings.void
defaultReindexOnUpdate
(ReindexOnUpdate defaultReindexOnUpdate) Defines the default depth of automatic reindexing.Starts the definition of the programmatic mapping.void
providedIdentifierBridge
(BeanReference<? extends IdentifierBridge<Object>> providedIdentifierBridge)
-
Method Details
-
programmaticMapping
ProgrammaticMappingConfigurationContext programmaticMapping()Starts the definition of the programmatic mapping.- Returns:
- A context to define the programmatic mapping.
-
annotationMapping
AnnotationMappingConfigurationContext annotationMapping()Starts the definition of the annotation mapping.- Returns:
- A context to define the annotation mapping.
-
containerExtractors
ContainerExtractorConfigurationContext containerExtractors()Starts the definition of container extractors available for use in mappings.- Returns:
- A context to define container extractors.
-
bridges
BridgesConfigurationContext bridges()Starts the definition of bridges to apply by default in mappings.- Returns:
- A context to define default bridges.
-
addEntityType
Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity()
instead.Register a type as an entity type with the default name, its simple class name.- Parameters:
type
- The type to be considered as an entity type, i.e. a type that may be indexed and whose instances be added/updated/deleted through theindexing plan
.
-
addEntityType
@Deprecated default StandalonePojoMappingConfigurationContext addEntityType(Class<?> type, String entityName) Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity().name( entityName )
instead.Register a type as an entity type with the given name.- Parameters:
type
- The type to be considered as an entity type, i.e. a type that may be indexed and whose instances be added/updated/deleted through theindexing plan
.entityName
- The name of the entity.
-
addEntityTypes
Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity()
for each type instead.- Parameters:
types
- The types to be considered as entity types, i.e. types that may be indexed and whose instances be added/updated/deleted through theindexing plan
.
-
addEntityTypes
@Deprecated default StandalonePojoMappingConfigurationContext addEntityTypes(Iterable<Class<?>> types) Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity()
for each type instead.- Parameters:
types
- The types to be considered as entity types, i.e. types that may be indexed and whose instances be added/updated/deleted through theindexing plan
.
-
addEntityType
@Deprecated default <E> StandalonePojoMappingConfigurationContext addEntityType(Class<E> type, EntityConfigurer<E> configurer) Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity().loadingBinder( binder )
instead.Register a type as an entity type with the default name, its simple class name.- Type Parameters:
E
- The entity type.- Parameters:
type
- The type to be considered as an entity type, i.e. a type that may be indexed and whose instances be added/updated/deleted through theindexing plan
.configurer
- The configurer, to provide additional information about the entity type.
-
addEntityType
@Deprecated default <E> StandalonePojoMappingConfigurationContext addEntityType(Class<E> type, String entityName, EntityConfigurer<E> configurer) Deprecated.UseSearchEntity
orprogrammaticMapping().type( type ).searchEntity().name( entityName ).loadingBinder( binder )
instead.Register a type as an entity type with the given name.- Type Parameters:
E
- The entity type.- Parameters:
type
- The type to be considered as an entity type, i.e. a type that may be indexed and whose instances be added/updated/deleted through theindexing plan
.entityName
- The name of the entity.configurer
- The configurer, to provide additional information about the entity type.
-
defaultReindexOnUpdate
Defines the default depth of automatic reindexing.Keep the default value (
ReindexOnUpdate.DEFAULT
if your entity model is a graph (normalized model, e.g. in ORMs); passReindexOnUpdate.SHALLOW
if your entity model is a collection of trees (denormalized model, e.g. in a document datastore).The exact behavior is as follows:
- If set to
ReindexOnUpdate.DEFAULT
, when entity A isindexed-embedded
in entity B, and a relevant property of entity A changes, then Hibernate Search will trigger reindexing of entity A (if appropriate) and entity B (if appropriate). - If set to
ReindexOnUpdate.SHALLOW
, when entity A isindexed-embedded
in entity B, and a relevant property of entity A changes, then Hibernate Search will trigger reindexing of entity A (if appropriate) only, and not entity B. - If set to
ReindexOnUpdate.NO
, when entity A isindexed-embedded
in entity B, and a relevant property of entity A changes, then Hibernate Search will trigger reindexing of neither entity A nor entity B. The only way to trigger reindexing will be to force it, e.g. withSearchIndexingPlan.addOrUpdate(Object)
(without passing a list of dirty paths) orSearchIndexingPlan.addOrUpdate(Object, DocumentRoutesDescriptor, Object, boolean, boolean, String...)
(withforceSelfDirty = true
orforceContainedDirty = true
)
- Parameters:
defaultReindexOnUpdate
- The default behavior
- If set to
-
providedIdentifierBridge
void providedIdentifierBridge(BeanReference<? extends IdentifierBridge<Object>> providedIdentifierBridge) - Parameters:
providedIdentifierBridge
- An identifier bridge to use by default for entities that don't have a property annotated withDocumentId
. Caution: the bridge will be applied to the whole entity, with the expectation that the identifier never changes for a given entity.
-
SearchEntity
orprogrammaticMapping().type( type ).searchEntity()
instead.