Class QueryMapper.Field
java.lang.Object
org.springframework.data.mongodb.core.convert.QueryMapper.Field
- Direct Known Subclasses:
QueryMapper.MetadataBackedField
- Enclosing class:
QueryMapper
Value object to represent a field and its meta-information.
- Author:
- Oliver Gierke
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newQueryMapper.Fieldwithout meta-information but the given name. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the field references an association in case it refers to a nested field.@Nullable Association<MongoPersistentProperty> Class<?> Returns the key to be used in the mapped document eventually.@Nullable MongoPersistentPropertyReturns the underlyingMongoPersistentPropertybacking the field.@Nullable MongoPersistentEntity<?> Returns theMongoPersistentEntitythat field is conatined in.booleanReturns whether the field represents an association.booleanReturns whether the current field is the id field.booleanisMap()Returns whether the field references aMap.Returns a newQueryMapper.Fieldwith the given name.
-
Field Details
-
POSITIONAL_OPERATOR
-
name
-
-
Constructor Details
-
Field
Creates a newQueryMapper.Fieldwithout meta-information but the given name.- Parameters:
name- must not be null or empty.
-
-
Method Details
-
with
Returns a newQueryMapper.Fieldwith the given name.- Parameters:
name- must not be null or empty.- Returns:
-
isIdField
public boolean isIdField()Returns whether the current field is the id field.- Returns:
-
getProperty
Returns the underlyingMongoPersistentPropertybacking the field. For path traversals this will be the property that represents the value to handle. This means it'll be the leaf property for plain paths or the association property in case we refer to an association somewhere in the path.- Returns:
- can be null.
-
getPropertyEntity
Returns theMongoPersistentEntitythat field is conatined in.- Returns:
- can be null.
-
isAssociation
public boolean isAssociation()Returns whether the field represents an association.- Returns:
-
getMappedKey
-
containsAssociation
public boolean containsAssociation()Returns whether the field references an association in case it refers to a nested field.- Returns:
-
getAssociation
-
isMap
-
getTypeHint
-
getFieldType
-