*/
public class SelectQueryValidator extends TreeNodeValidator {
@Override
public void validateObject(ProjectPath treeNodePath, Validator validator) {
SelectQuery query = (SelectQuery) treeNodePath.getObject();
validateName(query, treeNodePath, validator);
// Resolve root to Entity for further validation
Entity root = validateRoot(query, treeNodePath, validator);
// validate path-based parts
if (root != null) {
validateQualifier(root, query.getQualifier(), treeNodePath, validator);
for (final Ordering ordering : query.getOrderings()) {
validateOrdering(
root,
ordering,
treeNodePath,
validator);
}
if (query.getPrefetchTree() != null) {
for (final PrefetchTreeNode prefetchTreeNode : query.getPrefetchTree().nonPhantomNodes()) {
validatePrefetch(root, prefetchTreeNode.getPath(), treeNodePath, validator);
}
}
}
}