Skip to content

Commit 39068a3

Browse files
committed
DATAMONGO-1205 - Polishing.
Add author tag. Extend year range in copyright header. Original pull request: #397.
1 parent 28c2533 commit 39068a3

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/MongoPersistentEntityIndexResolver.java

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 the original author or authors.
2+
* Copyright 2014-2017 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.
@@ -53,9 +53,10 @@
5353
* indexed. <br />
5454
* All {@link MongoPersistentProperty} of the {@link MongoPersistentEntity} are inspected for potential indexes by
5555
* scanning related annotations.
56-
*
56+
*
5757
* @author Christoph Strobl
5858
* @author Thomas Darimont
59+
* @author Martin Macko
5960
* @since 1.5
6061
*/
6162
public class MongoPersistentEntityIndexResolver implements IndexResolver {
@@ -66,7 +67,7 @@ public class MongoPersistentEntityIndexResolver implements IndexResolver {
6667

6768
/**
6869
* Create new {@link MongoPersistentEntityIndexResolver}.
69-
*
70+
*
7071
* @param mappingContext must not be {@literal null}.
7172
*/
7273
public MongoPersistentEntityIndexResolver(MongoMappingContext mappingContext) {
@@ -87,7 +88,7 @@ public Iterable<? extends IndexDefinitionHolder> resolveIndexFor(TypeInformation
8788
* Resolve the {@link IndexDefinition}s for given {@literal root} entity by traversing {@link MongoPersistentProperty}
8889
* scanning for index annotations {@link Indexed}, {@link CompoundIndex} and {@link GeospatialIndex}. The given
8990
* {@literal root} has therefore to be annotated with {@link Document}.
90-
*
91+
*
9192
* @param root must not be null.
9293
* @return List of {@link IndexDefinitionHolder}. Will never be {@code null}.
9394
* @throws IllegalArgumentException in case of missing {@link Document} annotation marking root entities.
@@ -133,7 +134,7 @@ public void doWithPersistentProperty(MongoPersistentProperty persistentProperty)
133134

134135
/**
135136
* Recursively resolve and inspect properties of given {@literal type} for indexes to be created.
136-
*
137+
*
137138
* @param type
138139
* @param path The {@literal "dot} path.
139140
* @param collection
@@ -281,7 +282,7 @@ public void doWithPersistentProperty(MongoPersistentProperty persistentProperty)
281282

282283
/**
283284
* Create {@link IndexDefinition} wrapped in {@link IndexDefinitionHolder} for {@link CompoundIndexes} of given type.
284-
*
285+
*
285286
* @param dotPath The properties {@literal "dot"} path representation from its document root.
286287
* @param fallbackCollection
287288
* @param type
@@ -361,7 +362,7 @@ private DBObject resolveCompoundIndexKeyFromStringDefinition(String dotPath, Str
361362
/**
362363
* Creates {@link IndexDefinition} wrapped in {@link IndexDefinitionHolder} out of {@link Indexed} for given
363364
* {@link MongoPersistentProperty}.
364-
*
365+
*
365366
* @param dotPath The properties {@literal "dot"} path representation from its document root.
366367
* @param collection
367368
* @param persitentProperty
@@ -402,7 +403,7 @@ protected IndexDefinitionHolder createIndexDefinition(String dotPath, String fal
402403
/**
403404
* Creates {@link IndexDefinition} wrapped in {@link IndexDefinitionHolder} out of {@link GeoSpatialIndexed} for
404405
* {@link MongoPersistentProperty}.
405-
*
406+
*
406407
* @param dotPath The properties {@literal "dot"} path representation from its document root.
407408
* @param collection
408409
* @param persistentProperty
@@ -479,7 +480,7 @@ public void doWithAssociation(Association<MongoPersistentProperty> association)
479480
/**
480481
* {@link CycleGuard} holds information about properties and the paths for accessing those. This information is used
481482
* to detect potential cycles within the references.
482-
*
483+
*
483484
* @author Christoph Strobl
484485
*/
485486
static class CycleGuard {
@@ -529,24 +530,24 @@ private String createMapKey(MongoPersistentProperty property) {
529530
/**
530531
* Path defines the property and its full path from the document root. <br />
531532
* A {@link Path} with {@literal spring.data.mongodb} would be created for the property {@code Three.mongodb}.
532-
*
533+
*
533534
* <pre>
534535
* <code>
535536
* &#64;Document
536537
* class One {
537538
* Two spring;
538539
* }
539-
*
540+
*
540541
* class Two {
541542
* Three data;
542543
* }
543-
*
544+
*
544545
* class Three {
545546
* String mongodb;
546547
* }
547548
* </code>
548549
* </pre>
549-
*
550+
*
550551
* @author Christoph Strobl
551552
*/
552553
static class Path {
@@ -569,7 +570,7 @@ public String getPath() {
569570
* the current path. Given {@literal foo.bar.bar} cycles if {@literal foo.bar} has already been visited and
570571
* {@code class Bar} contains a property of type {@code Bar}. The previously mentioned path would not cycle if
571572
* {@code class Bar} contained a property of type {@code SomeEntity} named {@literal bar}.
572-
*
573+
*
573574
* @param property
574575
* @param path
575576
* @return
@@ -618,7 +619,7 @@ public String getMessage() {
618619
/**
619620
* Implementation of {@link IndexDefinition} holding additional (property)path information used for creating the
620621
* index. The path itself is the properties {@literal "dot"} path representation from its root document.
621-
*
622+
*
622623
* @author Christoph Strobl
623624
* @since 1.5
624625
*/
@@ -630,7 +631,7 @@ public static class IndexDefinitionHolder implements IndexDefinition {
630631

631632
/**
632633
* Create
633-
*
634+
*
634635
* @param path
635636
*/
636637
public IndexDefinitionHolder(String path, IndexDefinition definition, String collection) {
@@ -646,7 +647,7 @@ public String getCollection() {
646647

647648
/**
648649
* Get the {@literal "dot"} path used to create the index.
649-
*
650+
*
650651
* @return
651652
*/
652653
public String getPath() {
@@ -655,7 +656,7 @@ public String getPath() {
655656

656657
/**
657658
* Get the {@literal raw} {@link IndexDefinition}.
658-
*
659+
*
659660
* @return
660661
*/
661662
public IndexDefinition getIndexDefinition() {

0 commit comments

Comments
 (0)