Skip to content

Commit 7bfbff0

Browse files
committed
DATAMONGO-1205 - Polishing.
Add author tag. Extend year range in copyright header. Original pull request: #397.
1 parent fc377cf commit 7bfbff0

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-2016 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.
@@ -51,9 +51,10 @@
5151
* indexed. <br />
5252
* All {@link MongoPersistentProperty} of the {@link MongoPersistentEntity} are inspected for potential indexes by
5353
* scanning related annotations.
54-
*
54+
*
5555
* @author Christoph Strobl
5656
* @author Thomas Darimont
57+
* @author Martin Macko
5758
* @since 1.5
5859
*/
5960
public class MongoPersistentEntityIndexResolver implements IndexResolver {
@@ -64,7 +65,7 @@ public class MongoPersistentEntityIndexResolver implements IndexResolver {
6465

6566
/**
6667
* Create new {@link MongoPersistentEntityIndexResolver}.
67-
*
68+
*
6869
* @param mappingContext must not be {@literal null}.
6970
*/
7071
public MongoPersistentEntityIndexResolver(MongoMappingContext mappingContext) {
@@ -85,7 +86,7 @@ public Iterable<? extends IndexDefinitionHolder> resolveIndexFor(TypeInformation
8586
* Resolve the {@link IndexDefinition}s for given {@literal root} entity by traversing {@link MongoPersistentProperty}
8687
* scanning for index annotations {@link Indexed}, {@link CompoundIndex} and {@link GeospatialIndex}. The given
8788
* {@literal root} has therefore to be annotated with {@link Document}.
88-
*
89+
*
8990
* @param root must not be null.
9091
* @return List of {@link IndexDefinitionHolder}. Will never be {@code null}.
9192
* @throws IllegalArgumentException in case of missing {@link Document} annotation marking root entities.
@@ -131,7 +132,7 @@ public void doWithPersistentProperty(MongoPersistentProperty persistentProperty)
131132

132133
/**
133134
* Recursively resolve and inspect properties of given {@literal type} for indexes to be created.
134-
*
135+
*
135136
* @param type
136137
* @param path The {@literal "dot} path.
137138
* @param collection
@@ -293,7 +294,7 @@ public void doWithPersistentProperty(MongoPersistentProperty persistentProperty)
293294

294295
/**
295296
* Create {@link IndexDefinition} wrapped in {@link IndexDefinitionHolder} for {@link CompoundIndexes} of given type.
296-
*
297+
*
297298
* @param dotPath The properties {@literal "dot"} path representation from its document root.
298299
* @param fallbackCollection
299300
* @param type
@@ -372,7 +373,7 @@ private org.bson.Document resolveCompoundIndexKeyFromStringDefinition(String dot
372373
/**
373374
* Creates {@link IndexDefinition} wrapped in {@link IndexDefinitionHolder} out of {@link Indexed} for given
374375
* {@link MongoPersistentProperty}.
375-
*
376+
*
376377
* @param dotPath The properties {@literal "dot"} path representation from its document root.
377378
* @param collection
378379
* @param persitentProperty
@@ -416,7 +417,7 @@ protected IndexDefinitionHolder createIndexDefinition(String dotPath, String col
416417
/**
417418
* Creates {@link IndexDefinition} wrapped in {@link IndexDefinitionHolder} out of {@link GeoSpatialIndexed} for
418419
* {@link MongoPersistentProperty}.
419-
*
420+
*
420421
* @param dotPath The properties {@literal "dot"} path representation from its document root.
421422
* @param collection
422423
* @param persistentProperty
@@ -496,7 +497,7 @@ public void doWithAssociation(Association<MongoPersistentProperty> association)
496497
/**
497498
* {@link CycleGuard} holds information about properties and the paths for accessing those. This information is used
498499
* to detect potential cycles within the references.
499-
*
500+
*
500501
* @author Christoph Strobl
501502
*/
502503
static class CycleGuard {
@@ -546,24 +547,24 @@ private String createMapKey(MongoPersistentProperty property) {
546547
/**
547548
* Path defines the property and its full path from the document root. <br />
548549
* A {@link Path} with {@literal spring.data.mongodb} would be created for the property {@code Three.mongodb}.
549-
*
550+
*
550551
* <pre>
551552
* <code>
552553
* &#64;Document
553554
* class One {
554555
* Two spring;
555556
* }
556-
*
557+
*
557558
* class Two {
558559
* Three data;
559560
* }
560-
*
561+
*
561562
* class Three {
562563
* String mongodb;
563564
* }
564565
* </code>
565566
* </pre>
566-
*
567+
*
567568
* @author Christoph Strobl
568569
*/
569570
static class Path {
@@ -586,7 +587,7 @@ public String getPath() {
586587
* the current path. Given {@literal foo.bar.bar} cycles if {@literal foo.bar} has already been visited and
587588
* {@code class Bar} contains a property of type {@code Bar}. The previously mentioned path would not cycle if
588589
* {@code class Bar} contained a property of type {@code SomeEntity} named {@literal bar}.
589-
*
590+
*
590591
* @param property
591592
* @param path
592593
* @return
@@ -635,7 +636,7 @@ public String getMessage() {
635636
/**
636637
* Implementation of {@link IndexDefinition} holding additional (property)path information used for creating the
637638
* index. The path itself is the properties {@literal "dot"} path representation from its root document.
638-
*
639+
*
639640
* @author Christoph Strobl
640641
* @since 1.5
641642
*/
@@ -647,7 +648,7 @@ public static class IndexDefinitionHolder implements IndexDefinition {
647648

648649
/**
649650
* Create
650-
*
651+
*
651652
* @param path
652653
*/
653654
public IndexDefinitionHolder(String path, IndexDefinition definition, String collection) {
@@ -663,7 +664,7 @@ public String getCollection() {
663664

664665
/**
665666
* Get the {@literal "dot"} path used to create the index.
666-
*
667+
*
667668
* @return
668669
*/
669670
public String getPath() {
@@ -672,7 +673,7 @@ public String getPath() {
672673

673674
/**
674675
* Get the {@literal raw} {@link IndexDefinition}.
675-
*
676+
*
676677
* @return
677678
*/
678679
public IndexDefinition getIndexDefinition() {

0 commit comments

Comments
 (0)