Skip to content

Commit 8de15a5

Browse files
committed
DATAMONGO-2138 - Improve KDoc
1 parent 4388c25 commit 8de15a5

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query/NestedProperty.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2018 the original author or authors.
2+
* Copyright 2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ import kotlin.reflect.KProperty
2020
import kotlin.reflect.KProperty1
2121

2222
/**
23-
* Nested property to generate Mongo field name.
23+
* Refer to a field in an embedded/nested document.
2424
* @author Tjeu Kayim
2525
* @since 2.2
2626
*/
@@ -29,6 +29,11 @@ class NestedProperty<T, U>(
2929
internal val child: KProperty1<T, U>
3030
) : KProperty<U> by child
3131

32+
/**
33+
* Recursively construct field name for a nested property.
34+
* @author Tjeu Kayim
35+
* @since 2.2
36+
*/
3237
fun nestedFieldName(property: KProperty<*>): String {
3338
return when (property) {
3439
is NestedProperty<*, *> ->

spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query/TypedCriteriaBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ class TypedCriteriaBuilder {
366366

367367
/**
368368
* Build nested properties.
369-
* Refer to a field in a embedded/nested document.
369+
* Refer to a field in an embedded/nested document.
370370
*
371371
* For example, referring to the field "book.author":
372372
* ```

spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query/TypedCriteriaExtensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
package org.springframework.data.mongodb.core.query
1717

1818
/**
19-
* Build [Criteria] with Property References as field names.
19+
* Build [Criteria] with type-safe field names.
2020
*
2121
* @sample typedCriteriaSample
2222
*

0 commit comments

Comments
 (0)