Class FunctionBuilders
- java.lang.Object
-
- com.tangosol.coherence.dslquery.function.FunctionBuilders
-
public final class FunctionBuilders extends Object
This class contains a number ofParameterizedBuilder
implementations for the standard built-in CohQL functions.- Since:
- Coherence 12.2.1
- Author:
- jk 2014.05.07
-
-
Field Summary
Fields Modifier and Type Field Description static ParameterizedBuilder<BigDecimalAverage>
BIG_DECIMAL_AVERAGE_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalAverage
aggregator.static ParameterizedBuilder<BigDecimalMax>
BIG_DECIMAL_MAX_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalMax
aggregator.static ParameterizedBuilder<BigDecimalMin>
BIG_DECIMAL_MIN_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalMin
aggregator.static ParameterizedBuilder<BigDecimalSum>
BIG_DECIMAL_SUM_FUNCTION_BUILDER
This builder will realize instances of theBigDecimalSum
aggregator.static ParameterizedBuilder<String>
CONCAT_FUNCTION_BUILDER
This builder will result in a concatenation of all function arguments to a single string result.static ParameterizedBuilder<Count>
COUNT_FUNCTION_BUILDER
This builder will realize instances of theCount
aggregator.static ParameterizedBuilder<DoubleAverage>
DOUBLE_AVERAGE_FUNCTION_BUILDER
This builder will realize instances of theDoubleAverage
aggregator.static ParameterizedBuilder<DoubleMax>
DOUBLE_MAX_FUNCTION_BUILDER
This builder will realize instances of theDoubleMax
aggregator.static ParameterizedBuilder<DoubleMin>
DOUBLE_MIN_FUNCTION_BUILDER
This builder will realize instances of theDoubleMin
aggregator.static ParameterizedBuilder<DoubleSum>
DOUBLE_SUM_FUNCTION_BUILDER
This builder will realize instances of theDoubleSum
aggregator.static ParameterizedBuilder<ValueExtractor>
KEY_FUNCTION_BUILDER
ThisParameterizedBuilder
handles the key() function.static ParameterizedBuilder<LongMax>
LONG_MAX_FUNCTION_BUILDER
This builder will realize instances of theLongMax
aggregator.static ParameterizedBuilder<LongMin>
LONG_MIN_FUNCTION_BUILDER
This builder will realize instances of theLongMin
aggregator.static ParameterizedBuilder<LongSum>
LONG_SUM_FUNCTION_BUILDER
This builder will realize instances of theLongSum
aggregator.static ParameterizedBuilder<ReflectionExtractor>
METHOD_CALL_FUNCTION_BUILDER
This builder will realize instances of aReflectionExtractor
that will call a specific method.static ParameterizedBuilder<IdentityExtractor>
VALUE_FUNCTION_BUILDER
This builder will realize instances of theIdentityExtractor
aggregator.
-
Constructor Summary
Constructors Constructor Description FunctionBuilders()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static <V> V
getFirstParameter(ParameterResolver resolver, ParameterList listParameters, Class<V> clzExpected)
Extract the first parameter from the listParameters argument.
-
-
-
Field Detail
-
BIG_DECIMAL_AVERAGE_FUNCTION_BUILDER
public static ParameterizedBuilder<BigDecimalAverage> 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
public static ParameterizedBuilder<BigDecimalMax> 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
public static ParameterizedBuilder<BigDecimalMin> 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
public static ParameterizedBuilder<BigDecimalSum> 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
public static ParameterizedBuilder<String> 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
public static ParameterizedBuilder<Count> 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
public static ParameterizedBuilder<DoubleAverage> 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
public static ParameterizedBuilder<DoubleMax> 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
public static ParameterizedBuilder<DoubleMin> 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
public static ParameterizedBuilder<DoubleSum> 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
public static ParameterizedBuilder<LongMax> 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
public static ParameterizedBuilder<LongMin> 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
public static ParameterizedBuilder<LongSum> 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
public static ParameterizedBuilder<ReflectionExtractor> METHOD_CALL_FUNCTION_BUILDER
This builder will realize instances of aReflectionExtractor
that will call a specific method.
-
VALUE_FUNCTION_BUILDER
public static ParameterizedBuilder<IdentityExtractor> 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
public static ParameterizedBuilder<ValueExtractor> 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.
-
-
Method Detail
-
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.
-
-