From 16baf00f5e594b7886bcaed59a9ea622087138ff Mon Sep 17 00:00:00 2001 From: Andrey Bloschetsov Date: Thu, 20 Sep 2012 09:34:24 +0400 Subject: [PATCH] =?UTF-8?q?DATAMONGO-637=20-=20Fixed=20typo=20in=20Query.q?= =?UTF-8?q?uery(=E2=80=A6).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correcting mispelled "critera". Polished JavaDoc a little. --- .../data/mongodb/core/query/Query.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Query.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Query.java index e4edae82f..d8e84ffd5 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Query.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Query.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2012 the original author or authors. + * Copyright 2010-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,22 +46,33 @@ public class Query { private String hint; /** - * Static factory method to create a Query using the provided criteria + * Static factory method to create a {@link Query} using the provided {@link Criteria}. * - * @param critera + * @param criteria must not be {@literal null}. * @return */ - public static Query query(Criteria critera) { - return new Query(critera); + public static Query query(Criteria criteria) { + return new Query(criteria); } public Query() { } + /** + * Creates a new {@link Query} using the given {@link Criteria}. + * + * @param criteria must not be {@literal null}. + */ public Query(Criteria criteria) { addCriteria(criteria); } + /** + * Adds the given {@link Criteria} to the current {@link Query}. + * + * @param criteria must not be {@literal null}. + * @return + */ public Query addCriteria(Criteria criteria) { CriteriaDefinition existing = this.criteria.get(criteria.getKey()); String key = criteria.getKey();