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; }
/** * This function should never actually be called - it is here solely so the * xml context function can be resolved properly. The actual function is * implemented in the XML planner. * @param context The context to apply the criteria in * @param expression The expression on the left side of the criteria * @return Same as expression */ public static Object context(Object context, Object expression) throws FunctionExecutionException { throw new FunctionExecutionException(QueryPlugin.Event.TEIID30406, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30406)); }
@Override public void addInputDirect(List<?> tuple, CommandContext commandContext) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException { if (type == Type.RANK) { if (count == Integer.MAX_VALUE) { throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID31174, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31174)); } count++; } }
public void visit(ElementSymbol obj) { try { resolveElementSymbol(obj); } catch(QueryMetadataException e) { handleException(handleUnresolvedElement(obj, e.getMessage())); } catch(TeiidComponentException e) { handleException(e); } catch (QueryResolverException e) { handleException(e); } }
public StoredProcedureInfo getStoredProcedureInfoForProcedure(final String name) throws TeiidComponentException, QueryMetadataException { StoredProcedureInfo result = getStoredProcInfoDirect(name); if (result == null) { throw new QueryMetadataException(QueryPlugin.Event.TEIID30357, name+NOT_EXISTS_MESSAGE); } return result; }
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; }
public static int divide(int x, int y) throws FunctionExecutionException { if (x == Integer.MIN_VALUE && y == -1) { throw new FunctionExecutionException(QueryPlugin.Event.TEIID31169, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31169, (long)Integer.MAX_VALUE + 1)); } return x / y; }
@Override public void addInputDirect(List<?> tuple, CommandContext commandContext) throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException { if (type == Type.RANK) { if (count == Long.MAX_VALUE) { throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID31289, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31289)); } count++; } }
private static QueryResolverException handleUnresolvedGroup(GroupSymbol symbol, String description) { UnresolvedSymbolDescription usd = new UnresolvedSymbolDescription(symbol.toString(), description); QueryResolverException e = new QueryResolverException(usd.getDescription()+": "+usd.getSymbol()); //$NON-NLS-1$ e.setUnresolvedSymbols(Arrays.asList(usd)); return e; }
public static int plus(int x, int y) throws FunctionExecutionException { long result = (long)x + y; if (result > Integer.MAX_VALUE || result < Integer.MIN_VALUE) { throw new FunctionExecutionException(QueryPlugin.Event.TEIID31169, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31169, result)); } return (int)result; }
private static QueryResolverException handleUnresolvedGroup(GroupSymbol symbol, String description) { UnresolvedSymbolDescription usd = new UnresolvedSymbolDescription(symbol.toString(), description); QueryResolverException e = new QueryResolverException(usd.getDescription()+": "+usd.getSymbol()); //$NON-NLS-1$ e.setUnresolvedSymbols(Arrays.asList(usd)); return e; }
public static int minus(int x, int y) throws FunctionExecutionException { long result = (long)x - y; if (result > Integer.MAX_VALUE || result < Integer.MIN_VALUE) { throw new FunctionExecutionException(QueryPlugin.Event.TEIID31169, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31169, result)); } return (int)result; }
private static QueryResolverException handleUnresolvedGroup(GroupSymbol symbol, String description) { UnresolvedSymbolDescription usd = new UnresolvedSymbolDescription(symbol.toString(), description); QueryResolverException e = new QueryResolverException(usd.getDescription()+": "+usd.getSymbol()); //$NON-NLS-1$ e.setUnresolvedSymbols(Arrays.asList(usd)); return e; }
public static int multiply(int x, int y) throws FunctionExecutionException { long result = (long)x * y; if (result > Integer.MAX_VALUE || result < Integer.MIN_VALUE) { throw new FunctionExecutionException(QueryPlugin.Event.TEIID31169, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31169, result)); } return (int)result; }
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(new Object[] {symbol})); throw e; }
/** * This pseudo-function should never actually be called - it is here solely so the * xml rowlimit function can be resolved properly. The actual functionality is * implemented in the XML planner/processor. * @param expression The expression on the left side of the criteria, an xml node * @return doesn't really return anything; this pseudo-function is used to control * the number of rows returned from a mapping class. */ public static Object rowlimit(Object expression) throws FunctionExecutionException { throw new FunctionExecutionException(QueryPlugin.Event.TEIID30407, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30407)); }
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; }
/** * This pseudo-function should never actually be called - it is here solely so the * xml rowlimitexception function can be resolved properly. The actual functionality is * implemented in the XML planner/processor. * @param expression The expression on the left side of the criteria, an xml node * @return doesn't really return anything; this pseudo-function is used to control * the number of rows returned from a mapping class. */ public static Object rowlimitexception(Object expression) throws FunctionExecutionException { throw new FunctionExecutionException(QueryPlugin.Event.TEIID30407, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30407)); }
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; }
private QueryResolverException handleUnresolvedElement(ElementSymbol symbol, String description) { UnresolvedSymbolDescription usd = new UnresolvedSymbolDescription(symbol.toString(), description); QueryResolverException e = new QueryResolverException(usd.getDescription()); e.setUnresolvedSymbols(Arrays.asList(usd)); return e; }