throw new QueryInvalidParametersException("Query is using named parameters yet also has \"" + id + "\"");
}
String paramName = id.substring(1);
try
{
Node node = new ParameterNode(NodeType.PARAMETER, Integer.valueOf(paramName), parameterPosition);
parameterPosition++;
stack.push(node);
return true;
}
catch (NumberFormatException nfe)
{
throw new NucleusUserException("Numbered parameter syntax starting ? but isnt followed by numeric!");
}
}
else if (first == ':')
{
// Named parameter - stored as String
if (paramType == null)
{
paramType = ParameterType.NAMED;
}
else if (paramType == ParameterType.NUMBERED)
{
throw new QueryInvalidParametersException("Query is using numbered parameters yet also has \"" + id + "\"");
}
Node node = new ParameterNode(NodeType.PARAMETER, id.substring(1), parameterPosition);
parameterPosition++;
stack.push(node);
return true;
}
else