Class SimpleElasticsearchPersistentProperty
java.lang.Object
org.springframework.data.mapping.model.AbstractPersistentProperty<P>
org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<ElasticsearchPersistentProperty>
org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchPersistentProperty
- All Implemented Interfaces:
ElasticsearchPersistentProperty
,PersistentProperty<ElasticsearchPersistentProperty>
public class SimpleElasticsearchPersistentProperty
extends AnnotationBasedPersistentProperty<ElasticsearchPersistentProperty>
implements ElasticsearchPersistentProperty
Elasticsearch specific
PersistentProperty
implementation processing- Author:
- Rizwan Idrees, Mohsin Husen, Mark Paluch, Sascha Woo, Oliver Gierke, Peter-Josef Meisch, Roman Puchkovskiy
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty
ElasticsearchPersistentProperty.PropertyToFieldNameConverter, ElasticsearchPersistentProperty.QueryPropertyToFieldNameConverter
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleElasticsearchPersistentProperty
(Property property, PersistentEntity<?, ElasticsearchPersistentProperty> owner, SimpleTypeHolder simpleTypeHolder) -
Method Summary
Modifier and TypeMethodDescriptionprotected Association<ElasticsearchPersistentProperty>
Returns the name to be used to store the property in the document.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Returns true if the property may be read from the store into the entity.boolean
Returns whether the current property is aSeqNoPrimaryTerm
property.boolean
boolean
boolean
Methods inherited from class org.springframework.data.mapping.model.AnnotationBasedPersistentProperty
findAnnotation, findPropertyOrOwnerAnnotation, getAssociationTargetTypeInformation, getSpelExpression, isAnnotationPresent, isAssociation, isTransient, isVersionProperty, toString, usePropertyAccess
Methods inherited from class org.springframework.data.mapping.model.AbstractPersistentProperty
equals, getActualType, getActualTypeInformation, getAssociation, getAssociationTargetType, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getPersistentEntityTypeInformation, getProperty, getRawType, getSetter, getType, getTypeInformation, getWither, hashCode, isArray, isCollectionLike, isEntity, isImmutable, isMap
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty
getActualTypeOrNull
Methods inherited from interface org.springframework.data.mapping.PersistentProperty
findAnnotation, findPropertyOrOwnerAnnotation, getAccessorForOwner, getActualType, getAssociation, getAssociationTargetType, getAssociationTargetTypeInformation, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getPersistentEntityTypeInformation, getRawType, getRequiredAnnotation, getRequiredAssociation, getRequiredField, getRequiredGetter, getRequiredSetter, getRequiredWither, getSetter, getSpelExpression, getType, getTypeInformation, getWither, hasActualTypeAnnotation, isAnnotationPresent, isArray, isAssociation, isCollectionLike, isEntity, isImmutable, isMap, isTransient, isVersionProperty, usePropertyAccess
-
Constructor Details
-
SimpleElasticsearchPersistentProperty
public SimpleElasticsearchPersistentProperty(Property property, PersistentEntity<?, ElasticsearchPersistentProperty> owner, SimpleTypeHolder simpleTypeHolder)
-
-
Method Details
-
hasPropertyValueConverter
public boolean hasPropertyValueConverter()- Specified by:
hasPropertyValueConverter
in interfaceElasticsearchPersistentProperty
- Returns:
- true if an
PropertyValueConverter
is available for this instance.
-
getPropertyValueConverter
- Specified by:
getPropertyValueConverter
in interfaceElasticsearchPersistentProperty
- Returns:
- the
PropertyValueConverter
for this instance.
-
isWritable
public boolean isWritable()- Specified by:
isWritable
in interfacePersistentProperty<ElasticsearchPersistentProperty>
- Overrides:
isWritable
in classAnnotationBasedPersistentProperty<ElasticsearchPersistentProperty>
-
isReadable
public boolean isReadable()Description copied from interface:ElasticsearchPersistentProperty
Returns true if the property may be read from the store into the entity.- Specified by:
isReadable
in interfaceElasticsearchPersistentProperty
- Returns:
- true if readable, false otherwise
-
storeNullValue
public boolean storeNullValue()- Specified by:
storeNullValue
in interfaceElasticsearchPersistentProperty
- Returns:
- true if null values should be stored in Elasticsearch
-
storeEmptyValue
public boolean storeEmptyValue()- Specified by:
storeEmptyValue
in interfaceElasticsearchPersistentProperty
- Returns:
- true if empty values ({
String
}, or {Collection
} or {Map
}) should be store in Elasticsearch.
-
hasExplicitFieldName
public boolean hasExplicitFieldName()- Specified by:
hasExplicitFieldName
in interfaceElasticsearchPersistentProperty
- Returns:
- true if the field name comes from an explicit value in the field annotation
-
getFieldName
Description copied from interface:ElasticsearchPersistentProperty
Returns the name to be used to store the property in the document.- Specified by:
getFieldName
in interfaceElasticsearchPersistentProperty
- Returns:
-
isIdProperty
public boolean isIdProperty()- Specified by:
isIdProperty
in interfacePersistentProperty<ElasticsearchPersistentProperty>
- Overrides:
isIdProperty
in classAnnotationBasedPersistentProperty<ElasticsearchPersistentProperty>
-
createAssociation
- Specified by:
createAssociation
in classAbstractPersistentProperty<ElasticsearchPersistentProperty>
-
isSeqNoPrimaryTermProperty
public boolean isSeqNoPrimaryTermProperty()Description copied from interface:ElasticsearchPersistentProperty
Returns whether the current property is aSeqNoPrimaryTerm
property.- Specified by:
isSeqNoPrimaryTermProperty
in interfaceElasticsearchPersistentProperty
- Returns:
- true if the type is
SeqNoPrimaryTerm
-
isGeoPointProperty
public boolean isGeoPointProperty()- Specified by:
isGeoPointProperty
in interfaceElasticsearchPersistentProperty
- Returns:
- true if this is a GeoPoint property
-
isGeoShapeProperty
public boolean isGeoShapeProperty()- Specified by:
isGeoShapeProperty
in interfaceElasticsearchPersistentProperty
- Returns:
- true if this is a GeoShape property
-
isJoinFieldProperty
public boolean isJoinFieldProperty()- Specified by:
isJoinFieldProperty
in interfaceElasticsearchPersistentProperty
- Returns:
- true if this is a JoinField property
-
isCompletionProperty
public boolean isCompletionProperty()- Specified by:
isCompletionProperty
in interfaceElasticsearchPersistentProperty
- Returns:
- true if this is a Completion property
-
isIndexedIndexNameProperty
public boolean isIndexedIndexNameProperty()- Specified by:
isIndexedIndexNameProperty
in interfaceElasticsearchPersistentProperty
- Returns:
- true if this is a property annotated with
IndexedIndexName
.
-