Package org.teiid.translator

Examples of org.teiid.translator.TranslatorException


    foreignKey.setParent(table);
    foreignKey.setColumns(new ArrayList<Column>(columnNames.size()));
    foreignKey.setName(name);
    setUUID(foreignKey);
    if (pkTable.getPrimaryKey() == null) {
      throw new TranslatorException("No primary key defined for table " + pkTable); //$NON-NLS-1$
    }
    foreignKey.setPrimaryKey(pkTable.getPrimaryKey());
    foreignKey.setUniqueKeyID(pkTable.getPrimaryKey().getUUID());
    assignColumns(columnNames, table, foreignKey);
    table.getForeignKeys().add(foreignKey);
View Full Code Here


          columns.getColumns().add(column);
          break;
        }
      }
      if (!match) {
        throw new TranslatorException(DataPlugin.Util.getString("MetadataFactory.no_column_found", columnName)); //$NON-NLS-1$
      }
    }
  }
View Full Code Here

            //create parameter index map
            CallableStatement cstmt = getCallableStatement(sql);
            this.results = this.executionFactory.executeStoredProcedure(cstmt, translatedComm, procedure.getReturnType());
            addStatementWarnings();
        }catch(SQLException e){
            throw new TranslatorException(e, JDBCPlugin.Util.getString("JDBCQueryExecution.Error_executing_query__1", sql)); //$NON-NLS-1$
        }          
       
    }
View Full Code Here

              break;
            }
      }
          return result;
        } catch (SQLException e) {
            throw new TranslatorException(e);
        }
    }
View Full Code Here

    return result.toString();
  }
 
  public static void validateQueryLength(StringBuffer query) throws TranslatorException {
    if(query.length() >= 10000) {
      throw new TranslatorException(SalesForcePlugin.Util.getString("Util.query.exceeds.max.length")); //$NON-NLS-1$
    }
  }
View Full Code Here

                }

                return vals;
            }
        } catch (SQLException e) {
            throw new TranslatorException(e,
                    JDBCPlugin.Util.getString("JDBCTranslator.Unexpected_exception_translating_results___8", e.getMessage())); //$NON-NLS-1$
        }
       
        return null;
    }
View Full Code Here

      for (DescribeGlobalSObjectResult object : objects) {
        addTable(object);
     
      addRelationships();
    } catch (ResourceException e) {
      throw new TranslatorException(e);
    }
  }
View Full Code Here

  private void addTable(DescribeGlobalSObjectResult object) throws TranslatorException {
    DescribeSObjectResult objectMetadata = null;
    try {
      objectMetadata = connection.getObjectMetaData(object.getName());
    } catch (ResourceException e) {
      throw new TranslatorException(e);
    }
   
    String name = NameUtil.normalizeName(objectMetadata.getName());
    Table table = metadataFactory.addTable(name);
   
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

    try {
      JDBCMetdataProcessor metadataProcessor = new JDBCMetdataProcessor();
      PropertiesUtils.setBeanProperties(metadataProcessor, metadataFactory.getImportProperties(), "importer"); //$NON-NLS-1$
      metadataProcessor.getConnectorMetadata(conn, metadataFactory);
    } catch (SQLException e) {
      throw new TranslatorException(e);
    }
  }   
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.