while (tokens.hasMoreTokens()) {
String token = tokens.nextToken();
if (token.equals("{")) {
token = tokens.nextToken();
if (Character.isDigit(token.charAt(0))) {
QueryParameter parameter = new QueryParameter(entity.getManager(), metadata.getMethod(), token);
// of if we are here we can assume that we have
// a parameter and not a function
sqlBuf.append("?");
params.add(parameter);