Package org.teiid.translator

Examples of org.teiid.translator.TranslatorException


      CellSetAxis rows = this.cellSet.getAxes().get(Axis.ROWS.axisOrdinal());
      iterator = rows.iterator();
      cols = cellSet.getAxes().get(Axis.COLUMNS.axisOrdinal());
        colWidth = rows.getAxisMetaData().getHierarchies().size() + this.cols.getPositions().size();
    } catch (SQLException e) {
      throw new TranslatorException(e);
    }
  }
View Full Code Here


      OlapStatement olapStatement = this.stmt;
      if (olapStatement != null) {
        olapStatement.cancel();
      }
    } catch (SQLException e) {
      throw new TranslatorException(e);
    }   
  }
View Full Code Here

      try {
        OlapWrapper wrapper = conn.unwrap(OlapWrapper.class);
        OlapConnection olapConn = wrapper.unwrap(OlapConnection.class);
        return olapConn;
      } catch(SQLException e) {
        throw new TranslatorException(e);
      }   
  }
View Full Code Here

    public Connection getConnection(DataSource ds)
        throws TranslatorException {
    try {
        return ds.getConnection();
    } catch (SQLException e) {
      throw new TranslatorException(e);
    }
    }
View Full Code Here

        }
        private synchronized void waitForCancel() throws TranslatorException {
            try {
                this.wait(simulatedBatchRetrievalTime);
                if (cancelled && driverThrowsExceptionOnCancel) {
                    throw new TranslatorException("Request cancelled"); //$NON-NLS-1$
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

          } catch (InterruptedException e) {
            throw new RuntimeException(e);
          }
        }
        if (throwExceptionOnExecute) {
            throw new TranslatorException("Connector Exception"); //$NON-NLS-1$
          }
        if (dataNotAvailable > -1) {
          int delay = dataNotAvailable;
          dataNotAvailable = -1;
          throw new DataNotAvailableException(delay);
View Full Code Here

          break;
        } catch (DataNotAvailableException e) {
          try {
          Thread.sleep(e.getRetryDelay());
        } catch (InterruptedException e1) {
          throw new TranslatorException(e1);
        }
        }
      }
      return results;
    }
View Full Code Here

  }

  public void visit(Select query) {
    super.visit(query);
    if (query.isDistinct()) {
      exceptions.add(new TranslatorException(SalesForcePlugin.Util.getString("SelectVisitor.distinct.not.supported")));
    }
    selectSymbols = query.getDerivedColumns();
    selectSymbolCount = selectSymbols.size();
    Iterator<DerivedColumn> symbolIter = selectSymbols.iterator();
    int index = 0;
    while (symbolIter.hasNext()) {
      DerivedColumn symbol = symbolIter.next();
      // get the name in source
      Expression expression = symbol.getExpression();
      if (expression instanceof ColumnReference) {
        Column element = ((ColumnReference) expression).getMetadataObject();
        selectSymbolIndexToElement.put(index, element);
        String qualifiedName = element.getParent().getNameInSource() + ':' + element.getNameInSource();
        selectSymbolNameToIndex .put(qualifiedName, index);
        String nameInSource = element.getNameInSource();
        if (null == nameInSource || nameInSource.length() == 0) {
          exceptions.add(new TranslatorException("name in source is null or empty for column "+ symbol.toString()));
          continue;
        }
        if (nameInSource.equalsIgnoreCase("id")) {
          idIndex = index;
        }
View Full Code Here

    try {
      table = obj.getMetadataObject();
          String supportsQuery = table.getProperties().get(Constants.SUPPORTS_QUERY);
          objectSupportsRetrieve = Boolean.valueOf(table.getProperties().get(Constants.SUPPORTS_RETRIEVE));
          if (!Boolean.valueOf(supportsQuery)) {
              throw new TranslatorException(table.getNameInSource() + " " + SalesForcePlugin.Util.getString("CriteriaVisitor.query.not.supported"));
          }
      loadColumnMetadata(obj);
    } catch (TranslatorException ce) {
      exceptions.add(ce);
    }
View Full Code Here

        } else {
          parent = parent.getParent();
          if(parent instanceof Table) {
            table = (Table)parent;
          } else {
            throw new TranslatorException("Could not resolve Table for column " + element.getName());
          }
        }
        result.append(table.getNameInSource());
        result.append('.');
        result.append(element.getNameInSource());
View Full Code Here

TOP

Related Classes of org.teiid.translator.TranslatorException

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.