@ -1,5 +1,5 @@
/ *
/ *
* Copyright 2010 - 2015 the original author or authors .
* Copyright 2010 - 2017 the original author or authors .
*
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
* you may not use this file except in compliance with the License .
@ -58,7 +58,7 @@ public class Query {
/ * *
/ * *
* Static factory method to create a { @link Query } using the provided { @link CriteriaDefinition } .
* Static factory method to create a { @link Query } using the provided { @link CriteriaDefinition } .
*
*
* @param criteriaDefinition must not be { @literal null } .
* @param criteriaDefinition must not be { @literal null } .
* @return
* @return
* @since 1 . 6
* @since 1 . 6
@ -71,7 +71,7 @@ public class Query {
/ * *
/ * *
* Creates a new { @link Query } using the given { @link CriteriaDefinition } .
* Creates a new { @link Query } using the given { @link CriteriaDefinition } .
*
*
* @param criteriaDefinition must not be { @literal null } .
* @param criteriaDefinition must not be { @literal null } .
* @since 1 . 6
* @since 1 . 6
* /
* /
@ -81,7 +81,7 @@ public class Query {
/ * *
/ * *
* Adds the given { @link CriteriaDefinition } to the current { @link Query } .
* Adds the given { @link CriteriaDefinition } to the current { @link Query } .
*
*
* @param criteriaDefinition must not be { @literal null } .
* @param criteriaDefinition must not be { @literal null } .
* @return
* @return
* @since 1 . 6
* @since 1 . 6
@ -96,7 +96,7 @@ public class Query {
} else {
} else {
throw new InvalidMongoDbApiUsageException (
throw new InvalidMongoDbApiUsageException (
"Due to limitations of the com.mongodb.BasicDBObject, " + "you can't add a second '" + key + "' criteria. "
"Due to limitations of the com.mongodb.BasicDBObject, " + "you can't add a second '" + key + "' criteria. "
+ "Query already contains '" + existing . getCriteriaObject ( ) + "'." ) ;
+ "Query already contains '" + serializeToJsonSafely ( existing . getCriteriaObject ( ) ) + "'." ) ;
}
}
return this ;
return this ;
@ -111,7 +111,7 @@ public class Query {
/ * *
/ * *
* Set number of documents to skip before returning results .
* Set number of documents to skip before returning results .
*
*
* @param skip
* @param skip
* @return
* @return
* /
* /
@ -122,7 +122,7 @@ public class Query {
/ * *
/ * *
* Limit the number of returned documents to { @code limit } .
* Limit the number of returned documents to { @code limit } .
*
*
* @param limit
* @param limit
* @return
* @return
* /
* /
@ -133,7 +133,7 @@ public class Query {
/ * *
/ * *
* Configures the query to use the given hint when being executed .
* Configures the query to use the given hint when being executed .
*
*
* @param name must not be { @literal null } or empty .
* @param name must not be { @literal null } or empty .
* @return
* @return
* /
* /
@ -146,7 +146,7 @@ public class Query {
/ * *
/ * *
* Sets the given pagination information on the { @link Query } instance . Will transparently set { @code skip } and
* Sets the given pagination information on the { @link Query } instance . Will transparently set { @code skip } and
* { @code limit } as well as applying the { @link Sort } instance defined with the { @link Pageable } .
* { @code limit } as well as applying the { @link Sort } instance defined with the { @link Pageable } .
*
*
* @param pageable
* @param pageable
* @return
* @return
* /
* /
@ -164,7 +164,7 @@ public class Query {
/ * *
/ * *
* Adds a { @link Sort } to the { @link Query } instance .
* Adds a { @link Sort } to the { @link Query } instance .
*
*
* @param sort
* @param sort
* @return
* @return
* /
* /
@ -199,7 +199,7 @@ public class Query {
/ * *
/ * *
* Restricts the query to only return documents instances that are exactly of the given types .
* Restricts the query to only return documents instances that are exactly of the given types .
*
*
* @param type may not be { @literal null }
* @param type may not be { @literal null }
* @param additionalTypes may not be { @literal null }
* @param additionalTypes may not be { @literal null }
* @return
* @return
@ -253,7 +253,7 @@ public class Query {
/ * *
/ * *
* Get the number of documents to skip .
* Get the number of documents to skip .
*
*
* @return
* @return
* /
* /
public int getSkip ( ) {
public int getSkip ( ) {
@ -262,7 +262,7 @@ public class Query {
/ * *
/ * *
* Get the maximum number of documents to be return .
* Get the maximum number of documents to be return .
*
*
* @return
* @return
* /
* /
public int getLimit ( ) {
public int getLimit ( ) {
@ -388,7 +388,7 @@ public class Query {
/ * *
/ * *
* Tests whether the settings of the given { @link Query } are equal to this query .
* Tests whether the settings of the given { @link Query } are equal to this query .
*
*
* @param that
* @param that
* @return
* @return
* /
* /
@ -405,7 +405,7 @@ public class Query {
return criteriaEqual & & fieldsEqual & & sortEqual & & hintEqual & & skipEqual & & limitEqual & & metaEqual ;
return criteriaEqual & & fieldsEqual & & sortEqual & & hintEqual & & skipEqual & & limitEqual & & metaEqual ;
}
}
/ *
/ *
* ( non - Javadoc )
* ( non - Javadoc )
* @see java . lang . Object # hashCode ( )
* @see java . lang . Object # hashCode ( )
* /
* /
@ -427,7 +427,7 @@ public class Query {
/ * *
/ * *
* Returns whether the given key is the one used to hold the type restriction information .
* Returns whether the given key is the one used to hold the type restriction information .
*
*
* @deprecated don ' t call this method as the restricted type handling will undergo some significant changes going
* @deprecated don ' t call this method as the restricted type handling will undergo some significant changes going
* forward .
* forward .
* @param key
* @param key