Parse the query looking for :([a-z0-9_]+)\b not in quotes, replace them with ? and build a Map<String, List<Integer>>. Then have
public P set(String name, T value) {
map.getOrDefault(param, Collections.emptyList())
.forEach(idx -> set(idx, value));
return this;
}