Package org.teiid.api.exception.query

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


    public String getInsertPlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
      ArgCheck.isInstanceOf(Table.class, groupID);
        Table tableRecordImpl = (Table)groupID;
        if (!tableRecordImpl.isVirtual()) {
            throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8")+tableRecordImpl.getFullName()); //$NON-NLS-1$
        }
        return tableRecordImpl.isInsertPlanEnabled()?tableRecordImpl.getInsertPlan():null;
    }
View Full Code Here


    public String getUpdatePlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
        ArgCheck.isInstanceOf(Table.class, groupID);
        Table tableRecordImpl = (Table)groupID;
        if (!tableRecordImpl.isVirtual()) {
          throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10")+tableRecordImpl.getFullName());         //$NON-NLS-1$
        }
        return tableRecordImpl.isUpdatePlanEnabled()?tableRecordImpl.getUpdatePlan():null;
    }
View Full Code Here

    public String getDeletePlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
        ArgCheck.isInstanceOf(Table.class, groupID);
        Table tableRecordImpl = (Table)groupID;
        if (!tableRecordImpl.isVirtual()) {
            throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12")+tableRecordImpl.getFullName()); //$NON-NLS-1$
        }
        return tableRecordImpl.isDeletePlanEnabled()?tableRecordImpl.getDeletePlan():null;
    }
View Full Code Here

            }
            schema = getVDBResourceAsSQLXML(parentPath + string);
          }
         
          if (schema == null) {
            throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1")+groupName);             //$NON-NLS-1$   
          }
          schemas.add(schema);
        }
       
        return schemas;
View Full Code Here

        Assertion.isNotNull(elementName);

    Object obj = store.findObject(elementName, FakeMetadataObject.ELEMENT);
    if(obj == null) {
      throw new QueryMetadataException("Element '" + elementName + "' not found."); //$NON-NLS-1$ //$NON-NLS-2$
    }
    return obj;
  }
View Full Code Here

        Assertion.isNotNull(groupName);

        Object result = store.findObject(groupName, FakeMetadataObject.GROUP);
        if (result == null){
            throw new QueryMetadataException("Group '" + groupName + "' not found."); //$NON-NLS-1$ //$NON-NLS-2$
        }
        return result;
  }
View Full Code Here

    public Collection getGroupsForPartialName(String partialGroupName)
        throws TeiidComponentException, QueryMetadataException {

    if(partialGroupName == null) {
      throw new QueryMetadataException("Group name cannot be null"); //$NON-NLS-1$
    }
       
        String qualifiedPartialPart = "."+partialGroupName; //$NON-NLS-1$
       
    // get all groupNames present in metadata
View Full Code Here

        throws TeiidComponentException, QueryMetadataException {
      ArgCheck.isInstanceOf(FakeMetadataObject.class, groupID);
      FakeMetadataObject group = (FakeMetadataObject) groupID;
    QueryNode queryNode = (QueryNode) group.getProperty(FakeMetadataObject.Props.PLAN);
    if (queryNode.getQuery() == null) {
        throw new QueryMetadataException("no query");//$NON-NLS-1$
    }
    return queryNode;
  }
View Full Code Here

  public boolean modelSupports(Object modelID, int supportConstant)
        throws TeiidComponentException, QueryMetadataException {
    ArgCheck.isInstanceOf(FakeMetadataObject.class, modelID);
    switch(supportConstant) {
      default:
        throw new QueryMetadataException("Unknown model support constant: " + supportConstant); //$NON-NLS-1$
    }
  }
View Full Code Here

    switch(groupConstant) {
      case SupportConstants.Group.UPDATE:
        supports = (Boolean) group.getProperty(FakeMetadataObject.Props.UPDATE);
        break;
      default:
        throw new QueryMetadataException("Unknown group support constant: " + groupConstant); //$NON-NLS-1$
    }
    return supports.booleanValue();
  }
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.