Module spring.data.mongodb
Class QueryUtils
java.lang.Object
org.springframework.data.mongodb.repository.query.QueryUtils
Internal utility class to help avoid duplicate code required in both the reactive and the sync
Query support
offered by repositories.- Since:
- 2.1
- Author:
- Christoph Strobl, Mark Paluch
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QuerydecorateSort(Query query, org.bson.Document defaultSort) static Class<?>queryProxyType(Class<? extends Query> baseType, ClassLoader classLoader)
-
Field Details
-
LOGGER
-
-
Constructor Details
-
QueryUtils
public QueryUtils()
-
-
Method Details
-
decorateSort
DecorateQueryand add a default sort expression to the givenQuery. Attributes of the givensortmay be overwritten by the sort explicitly defined by theQueryitself.- Parameters:
query- theQueryto decorate.defaultSort- the default sort expression to apply to the query.- Returns:
- the query having the given
sortapplied.
-
queryProxyType
DecorateQueryand add a default sort expression to the givenQuery. Attributes of the givensortmay be overwritten by the sort explicitly defined by theQueryitself.- Parameters:
classLoader- theClassLoaderto use for generating the proxy type with.
-