return new QueryParser().parseQuery(queryString, processingChain);
}
private FieldDescriptor getFieldDescriptor(Descriptor messageDescriptor, String attributePath) {
FieldDescriptor fd = null;
String[] split = attributePath.split("[.]");
for (int i = 0; i < split.length; i++) {
String name = split[i];
fd = messageDescriptor.findFieldByName(name);
if (fd == null) {
throw new IllegalArgumentException("Unknown field " + name + " in type " + messageDescriptor.getFullName());
}
if (i < split.length - 1) {
messageDescriptor = fd.getMessageType();
}
}
return fd;
}