private static Set<String> resolveAggregateFunctions(Map<String, JpqlFunctionGroup> functions) { Set<String> aggregateFunctions = new HashSet<String>(); for (Map.Entry<String, JpqlFunctionGroup> entry : functions.entrySet()) { if (entry.getValue().isAggregate()) { aggregateFunctions.add(entry.getKey().toLowerCase()); } } // add standard JPQL aggregate functions aggregateFunctions.add("sum"); aggregateFunctions.add("min"); aggregateFunctions.add("max"); aggregateFunctions.add("avg"); aggregateFunctions.add("count"); return aggregateFunctions; }
LOG.warning("Could not register the function '" + functionName + "' because there is neither an implementation for the dbms '" + dbms + "' nor a default implementation!"); } else if (!caseInsensitiveRegisteredFunctions.containsKey(functionName.toLowerCase())) { exprFactory.registerMethod(null, functionName, new DataNucleusJpqlFunctionAdapter(function, dbmsFunctionGroup.isAggregate()));
LOG.warning("Could not register the function '" + functionName + "' because there is neither an implementation for the dbms '" + dbms + "' nor a default implementation!"); } else if (!caseInsensitiveRegisteredFunctions.containsKey(functionName.toLowerCase())) { exprFactory.registerMethod(null, functionName, new DataNucleusJpqlFunctionAdapter(function, dbmsFunctionGroup.isAggregate()));
SQLMethod method = new DataNucleusJpqlFunctionAdapter(function, dbmsFunctionGroup.isAggregate()); Set<Object> methodKeys = fieldGet("methodNamesSupported", exprFactory, VERSION); LOG.warning("Could not register the function '" + functionName + "' because there is neither an implementation for the dbms '" + dbms + "' nor a default implementation!"); } else if (!caseInsensitiveRegisteredFunctions.containsKey(functionName.toLowerCase())) { exprFactory.registerMethod(null, functionName, new DataNucleusJpqlFunctionAdapter(function, dbmsFunctionGroup.isAggregate()), true);