DATAMONGO-637 - Fixed typo in Query.query(…).

Correcting mispelled "critera". Polished JavaDoc a little.
This commit is contained in:
Andrey Bloschetsov
2012-09-20 09:34:24 +04:00
committed by Oliver Gierke
parent 61a2c56a27
commit 16baf00f5e

View File

@@ -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();