/** * @param entity * @param key * @param mappingContext * @return */ protected Field createPropertyField(@Nullable MongoPersistentEntity<?> entity, String key, MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext) { if (entity == null) { return new Field(key); } if (Field.ID_KEY.equals(key)) { return new MetadataBackedField(key, entity, mappingContext, entity.getIdProperty()); } return new MetadataBackedField(key, entity, mappingContext); }
/** * @param entity * @param key * @param mappingContext * @return */ protected Field createPropertyField(@Nullable MongoPersistentEntity<?> entity, String key, MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext) { return entity == null ? new Field(key) : new MetadataBackedField(key, entity, mappingContext); }
/** * Returns a new {@link DocumentField} with the given name. * * @param name must not be {@literal null} or empty. * @return */ public Field with(String name) { return new Field(name); }
/** * Returns a new {@link DocumentField} with the given name. * * @param name must not be {@literal null} or empty. * @return */ public Field with(String name) { return new Field(name); }