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 Query
decorateSort
(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
DecorateQuery
and add a default sort expression to the givenQuery
. Attributes of the givensort
may be overwritten by the sort explicitly defined by theQuery
itself.- Parameters:
query
- theQuery
to decorate.defaultSort
- the default sort expression to apply to the query.- Returns:
- the query having the given
sort
applied.
-
queryProxyType
DecorateQuery
and add a default sort expression to the givenQuery
. Attributes of the givensort
may be overwritten by the sort explicitly defined by theQuery
itself.- Parameters:
classLoader
- theClassLoader
to use for generating the proxy type with.
-