protected static class QueryMapper.MetadataBackedField extends QueryMapper.Field
QueryMapper.Field
to be backed with mapping metadata.name, POSITIONAL_OPERATOR
Constructor and Description |
---|
MetadataBackedField(String name,
MongoPersistentEntity<?> entity,
MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> context)
Creates a new
QueryMapper.MetadataBackedField with the given name, MongoPersistentEntity and
MappingContext . |
MetadataBackedField(String name,
MongoPersistentEntity<?> entity,
MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> context,
MongoPersistentProperty property)
Creates a new
QueryMapper.MetadataBackedField with the given name, MongoPersistentEntity and
MappingContext with the given MongoPersistentProperty . |
containsAssociation, isMap
public MetadataBackedField(String name, MongoPersistentEntity<?> entity, MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> context)
QueryMapper.MetadataBackedField
with the given name, MongoPersistentEntity
and
MappingContext
.name
- must not be null or empty.entity
- must not be null.context
- must not be null.public MetadataBackedField(String name, MongoPersistentEntity<?> entity, MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> context, @Nullable MongoPersistentProperty property)
QueryMapper.MetadataBackedField
with the given name, MongoPersistentEntity
and
MappingContext
with the given MongoPersistentProperty
.name
- must not be null or empty.entity
- must not be null.context
- must not be null.property
- may be null.public QueryMapper.MetadataBackedField with(String name)
QueryMapper.Field
QueryMapper.Field
with the given name.with
in class QueryMapper.Field
name
- must not be null or empty.public boolean isIdField()
QueryMapper.Field
isIdField
in class QueryMapper.Field
public MongoPersistentProperty getProperty()
QueryMapper.Field
MongoPersistentProperty
backing 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.getProperty
in class QueryMapper.Field
public MongoPersistentEntity<?> getPropertyEntity()
QueryMapper.Field
MongoPersistentEntity
that field is conatined in.getPropertyEntity
in class QueryMapper.Field
@Nullable public MongoPersistentEntity<?> getEntity()
public boolean isAssociation()
QueryMapper.Field
isAssociation
in class QueryMapper.Field
public Association<MongoPersistentProperty> getAssociation()
getAssociation
in class QueryMapper.Field
public String getMappedKey()
QueryMapper.Field
getMappedKey
in class QueryMapper.Field
@Nullable protected PersistentPropertyPath<MongoPersistentProperty> getPath()
protected Converter<MongoPersistentProperty,String> getPropertyConverter()
Converter
to be used to created the mapped key. Default implementation will use
MongoPersistentProperty.PropertyToFieldNameConverter
.protected Converter<MongoPersistentProperty,String> getAssociationConverter()
Converter
to use for creating the mapped key of an association. Default implementation is
QueryMapper.AssociationConverter
.protected MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> getMappingContext()
public TypeInformation<?> getTypeHint()
getTypeHint
in class QueryMapper.Field
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.