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
FieldsModifier and TypeFieldDescriptionThis builder will realize instances of theBigDecimalAverageaggregator.static ParameterizedBuilder<BigDecimalMax>This builder will realize instances of theBigDecimalMaxaggregator.static ParameterizedBuilder<BigDecimalMin>This builder will realize instances of theBigDecimalMinaggregator.static ParameterizedBuilder<BigDecimalSum>This builder will realize instances of theBigDecimalSumaggregator.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 theCountaggregator.static ParameterizedBuilder<DoubleAverage>This builder will realize instances of theDoubleAverageaggregator.static ParameterizedBuilder<DoubleMax>This builder will realize instances of theDoubleMaxaggregator.static ParameterizedBuilder<DoubleMin>This builder will realize instances of theDoubleMinaggregator.static ParameterizedBuilder<DoubleSum>This builder will realize instances of theDoubleSumaggregator.static ParameterizedBuilder<ValueExtractor>ThisParameterizedBuilderhandles the key() function.static ParameterizedBuilder<LongMax>This builder will realize instances of theLongMaxaggregator.static ParameterizedBuilder<LongMin>This builder will realize instances of theLongMinaggregator.static ParameterizedBuilder<LongSum>This builder will realize instances of theLongSumaggregator.This builder will realize instances of aReflectionExtractorthat will call a specific method.This builder will realize instances of theIdentityExtractoraggregator. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static <V> VgetFirstParameter(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 theBigDecimalAverageaggregator. This builder is called as a result of the CohQL bd_avg() function. -
BIG_DECIMAL_MAX_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalMaxaggregator. This builder is called as a result of the CohQL bd_max() function. -
BIG_DECIMAL_MIN_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalMinaggregator. This builder is called as a result of the CohQL bd_min() function. -
BIG_DECIMAL_SUM_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalSumaggregator. 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 theCountaggregator. This builder is called as a result of the CohQL count() function. -
DOUBLE_AVERAGE_FUNCTION_BUILDER
This builder will realize instances of theDoubleAverageaggregator. This builder is called as a result of the CohQL avg() function. -
DOUBLE_MAX_FUNCTION_BUILDER
This builder will realize instances of theDoubleMaxaggregator. This builder is called as a result of the CohQL max() function. -
DOUBLE_MIN_FUNCTION_BUILDER
This builder will realize instances of theDoubleMinaggregator. This builder is called as a result of the CohQL min() function. -
DOUBLE_SUM_FUNCTION_BUILDER
This builder will realize instances of theDoubleSumaggregator. This builder is called as a result of the CohQL sum() function. -
LONG_MAX_FUNCTION_BUILDER
This builder will realize instances of theLongMaxaggregator. This builder is called as a result of the CohQL long_max() function. -
LONG_MIN_FUNCTION_BUILDER
This builder will realize instances of theLongMinaggregator. This builder is called as a result of the CohQL long_min() function. -
LONG_SUM_FUNCTION_BUILDER
This builder will realize instances of theLongSumaggregator. This builder is called as a result of the CohQL long_sum() function. -
METHOD_CALL_FUNCTION_BUILDER
This builder will realize instances of aReflectionExtractorthat will call a specific method. -
VALUE_FUNCTION_BUILDER
This builder will realize instances of theIdentityExtractoraggregator. This builder is called as a result of the CohQL value() function. -
KEY_FUNCTION_BUILDER
ThisParameterizedBuilderhandles the key() function. The type ofValueExtractorrealized 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- theParameterResolverfor resolving namedParameterslistParameters- 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.
-