} else
arguments = null;
} else {
// LOOK FOR FUNCTION
final OSQLFunction f = OSQLEngine.getInstance().getFunction(methodName);
if (f == null)
// ERROR: METHOD/FUNCTION NOT FOUND OR MISPELLED
throw new OQueryParsingException(iQueryToParse.parserText,
"Syntax error: function or field operator not recognized between the supported ones: "
+ OSQLEngine.getMethodNames(), 0);
if (f.getMaxParams() == -1 || f.getMaxParams() > 0) {
arguments = OStringSerializerHelper.getParameters(part).toArray();
if (arguments.length + 1 < f.getMinParams() || (f.getMaxParams() > -1 && arguments.length + 1 > f.getMaxParams()))
throw new OQueryParsingException(iQueryToParse.parserText, "Syntax error: function '" + f.getName() + "' needs "
+ (f.getMinParams() == f.getMaxParams() ? f.getMinParams() : f.getMinParams() + "-" + f.getMaxParams())
+ " argument(s) while has been received " + arguments.length, 0);
} else
arguments = null;
method = new OSQLMethodFunctionDelegate(f);