Package org.teiid.translator

Examples of org.teiid.translator.TranslatorException


    public Column getColumn(String fullName) throws TranslatorException {
    try {
      Object metadataId = metadata.getElementID(fullName);
      return getElement(metadataId);
    } catch (QueryMetadataException e) {
      throw new TranslatorException(e);
    } catch (TeiidComponentException e) {
      throw new TranslatorException(e);
    }
    }
View Full Code Here


    public Table getTable(String fullName) throws TranslatorException {
    try {
      Object groupId = metadata.getGroupID(fullName);
        return getGroup(groupId);
    } catch (QueryMetadataException e) {
      throw new TranslatorException(e);
    } catch (TeiidComponentException e) {
      throw new TranslatorException(e);
    }
    }
View Full Code Here

    public Procedure getProcedure(String fullName) throws TranslatorException {
    try {
      StoredProcedureInfo sp = metadata.getStoredProcedureInfoForProcedure(fullName);
        return getProcedure(sp);
    } catch (QueryMetadataException e) {
      throw new TranslatorException(e);
    } catch (TeiidComponentException e) {
      throw new TranslatorException(e);
    }
    }
View Full Code Here

   
    public byte[] getBinaryVDBResource(String resourcePath) throws TranslatorException {
        try {
            return metadata.getBinaryVDBResource(resourcePath);
        } catch (QueryMetadataException e) {
            throw new TranslatorException(e);
        } catch (TeiidComponentException e) {
            throw new TranslatorException(e);
        }
    }
View Full Code Here

    public String getCharacterVDBResource(String resourcePath) throws TranslatorException {
        try {
            return metadata.getCharacterVDBResource(resourcePath);
        } catch (QueryMetadataException e) {
            throw new TranslatorException(e);
        } catch (TeiidComponentException e) {
            throw new TranslatorException(e);
        }
    }
View Full Code Here

    public String[] getVDBResourcePaths() throws TranslatorException {
        try {
            return metadata.getVDBResourcePaths();
        } catch (QueryMetadataException e) {
            throw new TranslatorException(e);
        } catch (TeiidComponentException e) {
            throw new TranslatorException(e);
        }
    }
View Full Code Here

    public SourceCapabilities findCapabilities(String modelName) throws TeiidComponentException {
      SourceCapabilities caps = userCache.get(modelName);
        if(caps != null) {
            return caps;
        }
        TranslatorException exception = null;
        ModelMetaData model = vdb.getModel(modelName);
        for (String sourceName:model.getSourceNames()) {
          try {
            ConnectorManager mgr = this.connectorRepo.getConnectorManager(sourceName);
            if (mgr == null) {
              throw new TranslatorException(QueryPlugin.Util.getString("CachedFinder.no_connector_found", sourceName, modelName, sourceName)); //$NON-NLS-1$
            }
            caps = mgr.getCapabilities();
            break;
            } catch(TranslatorException e) {
              if (exception == null) {
View Full Code Here

      return (TranslatorException)t;
    }
    if (t instanceof RuntimeException) {
      throw (RuntimeException)t;
    }
    return new TranslatorException(t);
    }
View Full Code Here

    return new TranslatorException(t);
    }
   
  public AtomicResultsMessage execute() throws TranslatorException, BlockedException {
        if(isCancelled()) {
        throw new TranslatorException("Request canceled"); //$NON-NLS-1$
      }
       
      LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.requestMsg.getAtomicRequestID(), "Processing NEW request:", this.requestMsg.getCommand()}); //$NON-NLS-1$                                    
      try {
        this.connectionFactory = this.manager.getConnectionFactory();
          this.connection = this.connector.getConnection(this.connectionFactory);

          Object unwrapped = null;
      if (connection instanceof WrappedConnection) {
        try {
          unwrapped = ((WrappedConnection)connection).unwrap();
        } catch (ResourceException e) {
          throw new TranslatorException(QueryPlugin.Util.getString("failed_to_unwrap_connection")); //$NON-NLS-1$
       
      }
     
          // Translate the command
          Command command = this.requestMsg.getCommand();
View Full Code Here

                    LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Exceeded max, returning", this.requestMsg.getMaxResultRows()}); //$NON-NLS-1$
                this.lastBatch = true;
                break;
                } else if (this.rowCount > this.requestMsg.getMaxResultRows() && this.requestMsg.isExceptionOnMaxRows()) {
                      String msg = QueryPlugin.Util.getString("ConnectorWorker.MaxResultRowsExceed", this.requestMsg.getMaxResultRows()); //$NON-NLS-1$
                      throw new TranslatorException(msg);
                  }
              }
          }
      } catch (DataNotAvailableException e) {
        if (rows.size() == 0) {
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.