public Map<String, SummaryFunction> getCustomFieldsToDefaultFunctions() {
if (customFieldsToDefaultFunctions == null) {
customFieldsToDefaultFunctions = new HashMap<String, SummaryFunction>();
for (String prefix : CUSTOM_FIELD_PREFIXES) {
for (String suffix : CUSTOM_FIELD_SUFFIXES) {
SummaryFunction function = !prefix.equals("string") && !prefix.equals("boolean")
? (
suffix.equals("0") ? new SumFunction() :
suffix.equals("1") ? new MinFunction() :
suffix.equals("2") ? new MaxFunction() : null
)