java.lang.Object
net.pincette.mongo.Features
Extra features for the query and aggregation expression language.
- Since:
- 1.5
- Author:
- Werner Donné
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Collection<com.schibsted.spt.data.jslt.Function>final BiFunction<JsonObject,String, JsonObject> final com.schibsted.spt.data.jslt.ResourceResolverfinal Map<String,QueryOperator> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithCustomJsltFunctions(Collection<com.schibsted.spt.data.jslt.Function> customJsltFunctions) Custom functions for JSLT transformations.withExpressionExtensions(Map<String, Operator> expressionExtensions) Additional MongoDB Operators.withExpressionResolver(BiFunction<JsonObject, String, JsonObject> expressionResolver) A function to resolve certain fields of MongoDB operators or query expressions.withJsltResolver(com.schibsted.spt.data.jslt.ResourceResolver jsltResolver) The import resolver for the JSLT compiler.withMatchExtensions(Map<String, QueryOperator> matchExtensions) Additional MongoDB query operators.
-
Field Details
-
customJsltFunctions
-
expressionExtensions
-
expressionResolver
-
jsltResolver
public final com.schibsted.spt.data.jslt.ResourceResolver jsltResolver -
matchExtensions
-
-
Constructor Details
-
Features
public Features()
-
-
Method Details
-
withCustomJsltFunctions
public Features withCustomJsltFunctions(Collection<com.schibsted.spt.data.jslt.Function> customJsltFunctions) Custom functions for JSLT transformations.- Parameters:
customJsltFunctions- the collection of JSLT functions.- Returns:
- A new features object.
-
withExpressionExtensions
Additional MongoDB Operators.- Parameters:
expressionExtensions- the mapping between operator names and their implementation.- Returns:
- A new features object.
-
withExpressionResolver
A function to resolve certain fields of MongoDB operators or query expressions. The first parameter is the expression and the second a context resource in which the expression is used. This could be a base directory a JAR resource or anything else. The function should return the modified expression.- Parameters:
expressionResolver- the first parameter is the expression and the second a context resource in which the expression is used. This could be a base directory a JAR resource or anything else. The function should return the modified expression.- Returns:
- A new features object.
- Since:
- 2.2
-
withJsltResolver
The import resolver for the JSLT compiler.- Parameters:
jsltResolver- an implementation that resolves imported JSLT scripts.- Returns:
- A new features object.
-
withMatchExtensions
Additional MongoDB query operators.- Parameters:
matchExtensions- the mapping between query operator names and their implementation.- Returns:
- A new features object.
-