Package org.teiid.api.exception.query

Examples of org.teiid.api.exception.query.ExpressionEvaluationException


    throws ExpressionEvaluationException, BlockedException, TeiidComponentException {
 
      try {
      return internalEvaluate(expression, tuple);
      } catch (ExpressionEvaluationException e) {
          throw new ExpressionEvaluationException(e, QueryPlugin.Util.getString("ExpressionEvaluator.Eval_failed", new Object[] {expression, e.getMessage()})); //$NON-NLS-1$
      }
  }
View Full Code Here


          Reader r = result.getCharacterStream();
          type = validate(xp, r);
        }
      }
    } catch (TransformationException e) {
      throw new ExpressionEvaluationException(e, e.getMessage());
    } catch (SQLException e) {
      throw new ExpressionEvaluationException(e, e.getMessage());
    }
    if (!xp.isDocument()) {
      type = Type.CONTENT;
    }
    XMLType xml = new XMLType(result);
View Full Code Here

        public Object getValue(NameValuePair<Object> t) {
          return t.value;
        }
      }, function.getDelimiter(), function.getQuote());
    } catch (TransformationException e) {
      throw new ExpressionEvaluationException(e, e.getMessage());
    }
  }
View Full Code Here

          try {
              if (evaluate(expr.getWhenCriteria(i), tuple)) {
                  return internalEvaluate(expr.getThenExpression(i), tuple);
              }
          } catch (ExpressionEvaluationException e) {
              throw new ExpressionEvaluationException(e, "ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", "CASE", expr.getWhenCriteria(i))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
          }
      }
      if (expr.getElseExpression() != null) {
          return internalEvaluate(expr.getElseExpression(), tuple);
      }
View Full Code Here

          String keyElementName = (String) values[2];
         
          try {
        return dataMgr.lookupCodeValue(context, codeTableName, returnElementName, keyElementName, values[3]);
      } catch (TeiidProcessingException e) {
        throw new ExpressionEvaluationException(e, e.getMessage());
      }
      }
     
    // Execute function
    Object result = fd.invokeFunction(values);
View Full Code Here

      Object result = null;
        ValueIterator valueIter;
    try {
      valueIter = evaluateSubquery(scalarSubquery, tuple);
    } catch (TeiidProcessingException e) {
      throw new ExpressionEvaluationException(e, e.getMessage());
    }
      if(valueIter.hasNext()) {
          result = valueIter.next();
          if(valueIter.hasNext()) {
              // The subquery should be scalar, but has produced
              // more than one result value - this is an exception case
              throw new ExpressionEvaluationException("ERR.015.006.0058", QueryPlugin.Util.getString("ERR.015.006.0058", scalarSubquery.getCommand())); //$NON-NLS-1$ //$NON-NLS-2$
          }
      }
      return result;
  }
View Full Code Here

        // 1-arg form - assume payload is a Properties object
        if(payload instanceof Properties) {
            return ((Properties)payload).getProperty(param);
        }           
        // Payload was bad
        throw new ExpressionEvaluationException(QueryPlugin.Util.getString("ExpressionEvaluator.Expected_props_for_payload_function", "commandPayload", payload.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

TOP

Related Classes of org.teiid.api.exception.query.ExpressionEvaluationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.