use of org.teiid.api.exception.query.UnresolvedSymbolDescription in project teiid by teiid.
the class ResolverUtil method handleUnresolvedGroup.
private static QueryResolverException handleUnresolvedGroup(GroupSymbol symbol, String description) {
UnresolvedSymbolDescription usd = new UnresolvedSymbolDescription(symbol.toString(), description);
// $NON-NLS-1$
QueryResolverException e = new QueryResolverException(usd.getDescription() + ": " + usd.getSymbol());
e.setUnresolvedSymbols(Arrays.asList(usd));
return e;
}
use of org.teiid.api.exception.query.UnresolvedSymbolDescription in project teiid by teiid.
the class ResolverVisitor method handleUnresolvedElement.
private QueryResolverException handleUnresolvedElement(ElementSymbol symbol, String description) {
UnresolvedSymbolDescription usd = new UnresolvedSymbolDescription(symbol, description);
QueryResolverException e = new QueryResolverException(usd.getDescription());
e.setUnresolvedSymbols(Arrays.asList(usd));
return e;
}
use of org.teiid.api.exception.query.UnresolvedSymbolDescription in project teiid by teiid.
the class SimpleQueryResolver method resolveAllInGroup.
private static GroupSymbol resolveAllInGroup(MultipleElementSymbol allInGroupSymbol, Set<GroupSymbol> groups, QueryMetadataInterface metadata) throws QueryResolverException, QueryMetadataException, TeiidComponentException {
String groupAlias = allInGroupSymbol.getGroup().getName();
List<GroupSymbol> groupSymbols = ResolverUtil.findMatchingGroups(groupAlias, groups, metadata);
if (groupSymbols.isEmpty() || groupSymbols.size() > 1) {
// $NON-NLS-1$ //$NON-NLS-2$
String msg = QueryPlugin.Util.getString(groupSymbols.isEmpty() ? "ERR.015.008.0047" : "SimpleQueryResolver.ambiguous_all_in_group", allInGroupSymbol);
QueryResolverException qre = new QueryResolverException(msg);
qre.addUnresolvedSymbol(new UnresolvedSymbolDescription(allInGroupSymbol.toString(), msg));
throw qre;
}
allInGroupSymbol.setGroup(groupSymbols.get(0).clone());
return groupSymbols.get(0);
}
use of org.teiid.api.exception.query.UnresolvedSymbolDescription in project teiid by teiid.
the class UpdateProcedureResolver method handleUnresolvableDeclaration.
private void handleUnresolvableDeclaration(ElementSymbol variable, String description) throws QueryResolverException {
UnresolvedSymbolDescription symbol = new UnresolvedSymbolDescription(variable.toString(), description);
QueryResolverException e = new QueryResolverException(symbol.getDescription());
e.setUnresolvedSymbols(Arrays.asList(symbol));
throw e;
}
Aggregations