Class FunctionBuilders
java.lang.Object
com.tangosol.coherence.dslquery.function.FunctionBuilders
This class contains a number of
ParameterizedBuilder
implementations for the standard built-in CohQL functions.- Since:
- Coherence 12.2.1
- Author:
- jk 2014.05.07
-
Field Summary
Modifier and TypeFieldDescriptionThis builder will realize instances of theBigDecimalAverage
aggregator.static ParameterizedBuilder
<BigDecimalMax> This builder will realize instances of theBigDecimalMax
aggregator.static ParameterizedBuilder
<BigDecimalMin> This builder will realize instances of theBigDecimalMin
aggregator.static ParameterizedBuilder
<BigDecimalSum> This builder will realize instances of theBigDecimalSum
aggregator.static ParameterizedBuilder
<String> This builder will result in a concatenation of all function arguments to a single string result.static ParameterizedBuilder
<Count> This builder will realize instances of theCount
aggregator.static ParameterizedBuilder
<DoubleAverage> This builder will realize instances of theDoubleAverage
aggregator.static ParameterizedBuilder
<DoubleMax> This builder will realize instances of theDoubleMax
aggregator.static ParameterizedBuilder
<DoubleMin> This builder will realize instances of theDoubleMin
aggregator.static ParameterizedBuilder
<DoubleSum> This builder will realize instances of theDoubleSum
aggregator.static ParameterizedBuilder
<ValueExtractor> ThisParameterizedBuilder
handles the key() function.static ParameterizedBuilder
<LongMax> This builder will realize instances of theLongMax
aggregator.static ParameterizedBuilder
<LongMin> This builder will realize instances of theLongMin
aggregator.static ParameterizedBuilder
<LongSum> This builder will realize instances of theLongSum
aggregator.This builder will realize instances of aReflectionExtractor
that will call a specific method.This builder will realize instances of theIdentityExtractor
aggregator. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static <V> V
getFirstParameter
(ParameterResolver resolver, ParameterList listParameters, Class<V> clzExpected) Extract the first parameter from the listParameters argument.
-
Field Details
-
BIG_DECIMAL_AVERAGE_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalAverage
aggregator. This builder is called as a result of the CohQL bd_avg() function. -
BIG_DECIMAL_MAX_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalMax
aggregator. This builder is called as a result of the CohQL bd_max() function. -
BIG_DECIMAL_MIN_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalMin
aggregator. This builder is called as a result of the CohQL bd_min() function. -
BIG_DECIMAL_SUM_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalSum
aggregator. This builder is called as a result of the CohQL bd_sum() function. -
CONCAT_FUNCTION_BUILDER
This builder will result in a concatenation of all function arguments to a single string result. This builder is called as a result of the CohQL concat() function.- Since:
- 21.06
-
COUNT_FUNCTION_BUILDER
This builder will realize instances of theCount
aggregator. This builder is called as a result of the CohQL count() function. -
DOUBLE_AVERAGE_FUNCTION_BUILDER
This builder will realize instances of theDoubleAverage
aggregator. This builder is called as a result of the CohQL avg() function. -
DOUBLE_MAX_FUNCTION_BUILDER
This builder will realize instances of theDoubleMax
aggregator. This builder is called as a result of the CohQL max() function. -
DOUBLE_MIN_FUNCTION_BUILDER
This builder will realize instances of theDoubleMin
aggregator. This builder is called as a result of the CohQL min() function. -
DOUBLE_SUM_FUNCTION_BUILDER
This builder will realize instances of theDoubleSum
aggregator. This builder is called as a result of the CohQL sum() function. -
LONG_MAX_FUNCTION_BUILDER
This builder will realize instances of theLongMax
aggregator. This builder is called as a result of the CohQL long_max() function. -
LONG_MIN_FUNCTION_BUILDER
This builder will realize instances of theLongMin
aggregator. This builder is called as a result of the CohQL long_min() function. -
LONG_SUM_FUNCTION_BUILDER
This builder will realize instances of theLongSum
aggregator. This builder is called as a result of the CohQL long_sum() function. -
METHOD_CALL_FUNCTION_BUILDER
This builder will realize instances of aReflectionExtractor
that will call a specific method. -
VALUE_FUNCTION_BUILDER
This builder will realize instances of theIdentityExtractor
aggregator. This builder is called as a result of the CohQL value() function. -
KEY_FUNCTION_BUILDER
ThisParameterizedBuilder
handles the key() function. The type ofValueExtractor
realized will depend on the type of the first element in the args array passed to the realize method. This builder is called as a result of the CohQL key() function.
-
-
Constructor Details
-
FunctionBuilders
public FunctionBuilders()
-
-
Method Details
-
getFirstParameter
protected static <V> V getFirstParameter(ParameterResolver resolver, ParameterList listParameters, Class<V> clzExpected) Extract the first parameter from the listParameters argument.- Type Parameters:
V
- the parameter type- Parameters:
resolver
- theParameterResolver
for resolving namedParameter
slistParameters
- an optionalParameterList
(may benull
) to be used for realizing the instance, eg: used as constructor parametersclzExpected
- the expected type of the first parameter- Returns:
- the first parameter from the listParameters argument
- Throws:
AssertionException
- if the listParameters list is empty or if the first parameter resolved from the list is null or not of the expected type.
-