Search in sources :

Example 1 with UnresolvedSymbolDescription

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;
}
Also used : UnresolvedSymbolDescription(org.teiid.api.exception.query.UnresolvedSymbolDescription) QueryResolverException(org.teiid.api.exception.query.QueryResolverException)

Example 2 with UnresolvedSymbolDescription

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;
}
Also used : UnresolvedSymbolDescription(org.teiid.api.exception.query.UnresolvedSymbolDescription) QueryResolverException(org.teiid.api.exception.query.QueryResolverException)

Example 3 with UnresolvedSymbolDescription

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);
}
Also used : UnresolvedSymbolDescription(org.teiid.api.exception.query.UnresolvedSymbolDescription) QueryResolverException(org.teiid.api.exception.query.QueryResolverException)

Example 4 with UnresolvedSymbolDescription

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;
}
Also used : UnresolvedSymbolDescription(org.teiid.api.exception.query.UnresolvedSymbolDescription) QueryResolverException(org.teiid.api.exception.query.QueryResolverException)

Aggregations

QueryResolverException (org.teiid.api.exception.query.QueryResolverException)4 UnresolvedSymbolDescription (org.teiid.api.exception.query.UnresolvedSymbolDescription)4