Module spring.data.elasticsearch
Interface ElasticsearchPersistentEntity<T>
- All Superinterfaces:
Iterable<ElasticsearchPersistentProperty>,PersistentEntity<T,ElasticsearchPersistentProperty>
- All Known Implementing Classes:
SimpleElasticsearchPersistentEntity
public interface ElasticsearchPersistentEntity<T>
extends PersistentEntity<T,ElasticsearchPersistentProperty>
ElasticsearchPersistentEntity
- Author:
- Rizwan Idrees, Mohsin Husen, Mark Paluch, Sascha Woo, Oliver Gierke, Ivan Greene, Peter-Josef Meisch, Roman Puchkovskiy, Subhobrata Dey
-
Method Summary
Modifier and TypeMethodDescriptiondynamic()Retrieves the aliases associated with the current entity.returns the default settings for an index.Returns theJoinFieldproperty of theElasticsearchPersistentEntity.getPersistentPropertyWithFieldName(String fieldName) returns theElasticsearchPersistentPropertywith the given fieldName (can be set by theField) annotation.shortdefault ElasticsearchPersistentPropertyReturns theSeqNoPrimaryTermproperty of theElasticsearchPersistentEntityor throws an IllegalStateException in case no such property is available on the entity.Returns theSeqNoPrimaryTermproperty of theElasticsearchPersistentEntity.shortbooleanReturns whether theElasticsearchPersistentEntityhas aJoinFieldproperty.booleanReturns whether theElasticsearchPersistentEntityhas aSeqNoPrimaryTermproperty.booleanbooleanbooleanresolveRouting(T bean) Resolves the routing for a bean.booleanbooleanbooleanMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.springframework.data.mapping.PersistentEntity
doWithAll, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getInstanceCreatorMetadata, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isCreatorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulation
-
Method Details
-
getIndexCoordinates
IndexCoordinates getIndexCoordinates() -
getAliases
Retrieves the aliases associated with the current entity.- Returns:
- Returns a set of aliases of the
PersistentEntity. - Since:
- 5.4
-
getShards
short getShards() -
getReplicas
short getReplicas() -
isUseServerConfiguration
boolean isUseServerConfiguration() -
getRefreshInterval
-
getIndexStoreType
-
getVersionProperty
ElasticsearchPersistentProperty getVersionProperty()- Specified by:
getVersionPropertyin interfacePersistentEntity<T,ElasticsearchPersistentProperty>
-
settingPath
-
getVersionType
-
isCreateIndexAndMapping
boolean isCreateIndexAndMapping() -
getPersistentPropertyWithFieldName
returns theElasticsearchPersistentPropertywith the given fieldName (can be set by theField) annotation.- Parameters:
fieldName- to field name for the search, must not be null- Returns:
- the found property, otherwise null
- Since:
- 4.0
-
hasSeqNoPrimaryTermProperty
boolean hasSeqNoPrimaryTermProperty()Returns whether theElasticsearchPersistentEntityhas aSeqNoPrimaryTermproperty. If this call returns true,getSeqNoPrimaryTermProperty()will return a non-null value.- Returns:
- false when
ElasticsearchPersistentEntitydoes not define a SeqNoPrimaryTerm property. - Since:
- 4.0
-
hasJoinFieldProperty
boolean hasJoinFieldProperty()Returns whether theElasticsearchPersistentEntityhas aJoinFieldproperty. If this call returns true,getJoinFieldProperty()will return a non-null value.- Returns:
- false when
ElasticsearchPersistentEntitydoes not define a JoinField property. - Since:
- 4.1
-
getSeqNoPrimaryTermProperty
Returns theSeqNoPrimaryTermproperty of theElasticsearchPersistentEntity. Can be null in case no such property is available on the entity.- Returns:
- the
SeqNoPrimaryTermElasticsearchPersistentPropertyof thePersistentEntityor null if not defined. - Since:
- 4.0
-
getJoinFieldProperty
Returns theJoinFieldproperty of theElasticsearchPersistentEntity. Can be null in case no such property is available on the entity.- Returns:
- the
JoinFieldElasticsearchPersistentPropertyof thePersistentEntityor null if not defined. - Since:
- 4.1
-
getRequiredSeqNoPrimaryTermProperty
Returns theSeqNoPrimaryTermproperty of theElasticsearchPersistentEntityor throws an IllegalStateException in case no such property is available on the entity.- Returns:
- the
SeqNoPrimaryTermElasticsearchPersistentPropertyof thePersistentEntity. - Since:
- 4.0
-
getIndexedIndexNameProperty
- Returns:
- the property annotated with
IndexedIndexNameif it exists, otherwise null - Since:
- 5.1
-
getDefaultSettings
Settings getDefaultSettings()returns the default settings for an index.- Returns:
- settings
- Since:
- 4.1
-
resolveRouting
Resolves the routing for a bean.- Parameters:
bean- the bean to resolve the routing for- Returns:
- routing value, may be null
-
getFieldNamingStrategy
FieldNamingStrategy getFieldNamingStrategy()- Returns:
- the
FieldNamingStrategyfor the entity - Since:
- 4.3
-
writeTypeHints
boolean writeTypeHints()- Returns:
- true if type hints on this entity should be written.
- Since:
- 4.3
-
dynamic
Dynamic dynamic()- Returns:
- the
dynamicmapping parameter value. - Since:
- 4.3
-
storeIdInSource
boolean storeIdInSource()- Returns:
- the storeIdInSource value from the document annotation
- Since:
- 5.1
-
storeVersionInSource
boolean storeVersionInSource()- Returns:
- the storeVersionInSource value from the document annotation.
- Since:
- 5.1
-
isAlwaysWriteMapping
boolean isAlwaysWriteMapping()- Returns:
- if the mapping should be written to the index on repository bootstrap even if the index already exists.
- Since:
- 5.2
-