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.@Nullable ElasticsearchPersistentProperty@Nullable String@Nullable ElasticsearchPersistentPropertyReturns theJoinFieldproperty of theElasticsearchPersistentEntity.@Nullable ElasticsearchPersistentPropertygetPersistentPropertyWithFieldName(String fieldName) returns theElasticsearchPersistentPropertywith the given fieldName (can be set by theField) annotation.@Nullable Stringshortdefault ElasticsearchPersistentPropertyReturns theSeqNoPrimaryTermproperty of theElasticsearchPersistentEntityor throws an IllegalStateException in case no such property is available on the entity.@Nullable ElasticsearchPersistentPropertyReturns theSeqNoPrimaryTermproperty of theElasticsearchPersistentEntity.short@Nullable ElasticsearchPersistentProperty@Nullable Document.VersionTypebooleanReturns whether theElasticsearchPersistentEntityhas aJoinFieldproperty.booleanReturns whether theElasticsearchPersistentEntityhas aSeqNoPrimaryTermproperty.booleanbooleanboolean@Nullable StringresolveRouting(T bean) Resolves the routing for a bean.@Nullable StringbooleanbooleanbooleanMethods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface PersistentEntity
doWithAll, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getInstanceCreatorMetadata, getName, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, hasIdProperty, hasVersionProperty, isAnnotationPresent, 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
@Nullable String getRefreshInterval() -
getIndexStoreType
@Nullable String getIndexStoreType() -
getVersionProperty
@Nullable ElasticsearchPersistentProperty getVersionProperty()- Specified by:
getVersionPropertyin interfacePersistentEntity<T, ElasticsearchPersistentProperty>
-
settingPath
@Nullable String settingPath() -
getVersionType
@Nullable Document.VersionType 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
@Nullable ElasticsearchPersistentProperty 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
@Nullable ElasticsearchPersistentProperty 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
@Nullable ElasticsearchPersistentProperty 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
-
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
-