Package org.teiid.api.exception.query

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


    }
    List<FunctionMethod> udfMethods = FunctionMetadataReader.loadFunctionMethods(file.openStream());
    ActivityReport<ReportItem> report = new ActivityReport<ReportItem>("UDF load"); //$NON-NLS-1$
    FunctionMetadataValidator.validateFunctionMethods(udfMethods,report);
    if(report.hasItems()) {
        throw new QueryMetadataException(QueryPlugin.Util.getString("ERR.015.001.0005", report)); //$NON-NLS-1$
    }
    this.methods.put(name, udfMethods);
  }
View Full Code Here


 
  public Schema getSchema(String fullName)
      throws QueryMetadataException {
    Schema result = getSchemas().get(fullName);
    if (result == null) {
          throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
    }
    return result;
  }
View Full Code Here

 
  public Table findGroup(String fullName)
      throws QueryMetadataException {
    int index = fullName.indexOf(TransformationMetadata.DELIMITER_STRING);
    if (index == -1) {
        throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
    }     
    String schema = fullName.substring(0, index);
    Table result = getSchema(schema).getTables().get(fullName.substring(index + 1));
    if (result == null) {
          throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
    }
    return result;
  }
View Full Code Here

          result.add(p)
        }
      }
    }
    if (result.isEmpty()) {
          throw new QueryMetadataException(name.substring(1)+TransformationMetadata.NOT_EXISTS_MESSAGE);
    }
    return result;
  }
View Full Code Here

        if(tempID != null) {
            return tempID;
        }
        Object[] params = new Object[]{elementName};
        String msg = QueryPlugin.Util.getString("TempMetadataAdapter.Element_____{0}_____not_found._1", params); //$NON-NLS-1$
        throw new QueryMetadataException(msg);
    }
View Full Code Here

        if(tempID != null) {
            return tempID;
        }
        Object[] params = new Object[]{groupName};
        String msg = QueryPlugin.Util.getString("TempMetadataAdapter.Group_____{0}_____not_found._1", params); //$NON-NLS-1$
        throw new QueryMetadataException(msg);
    }
View Full Code Here

    //==================================================================================

    public Object getElementID(final String elementName) throws TeiidComponentException, QueryMetadataException {
      int columnIndex = elementName.lastIndexOf(TransformationMetadata.DELIMITER_STRING);
    if (columnIndex == -1) {
      throw new QueryMetadataException(elementName+TransformationMetadata.NOT_EXISTS_MESSAGE);
    }
    Table table = this.store.findGroup(elementName.substring(0, columnIndex).toUpperCase());
    String shortElementName = elementName.substring(columnIndex + 1);
    for (Column column : (List<Column>)getElementIDsInGroupID(table)) {
      if (column.getName().equalsIgnoreCase(shortElementName)) {
        return column;
      }
        }
        throw new QueryMetadataException(elementName+TransformationMetadata.NOT_EXISTS_MESSAGE);
    }
View Full Code Here

    public StoredProcedureInfo getStoredProcedureInfoForProcedure(final String name)
        throws TeiidComponentException, QueryMetadataException {
        StoredProcedureInfo result = getStoredProcInfoDirect(name);
       
    if (result == null) {
      throw new QueryMetadataException(name+NOT_EXISTS_MESSAGE);
    }
     
        return result;
    }
View Full Code Here

       
        for (StoredProcedureInfo storedProcedureInfo : results) {
          Schema schema = (Schema)storedProcedureInfo.getModelID();
          if(name.equalsIgnoreCase(storedProcedureInfo.getProcedureCallableName()) || vdbMetaData == null || vdbMetaData.isVisible(schema.getName())){
            if (result != null) {
            throw new QueryMetadataException(QueryPlugin.Util.getString("ambiguous_procedure", name)); //$NON-NLS-1$
          }
            result = storedProcedureInfo;
          }
    }
    return result;
View Full Code Here

    public QueryNode getVirtualPlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
        ArgCheck.isInstanceOf(Table.class, groupID);

        Table tableRecord = (Table) groupID;
        if (!tableRecord.isVirtual()) {
            throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6")+tableRecord.getFullName()); //$NON-NLS-1$
        }
        String transQuery = tableRecord.getSelectTransformation();
        QueryNode queryNode = new QueryNode(transQuery);

        // get any bindings and add them onto the query node
View Full Code Here

TOP

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

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.