Package org.teiid.metadata

Examples of org.teiid.metadata.AbstractMetadataRecord$Modifiable


        NamedTable group = obj.getTable();
        if (group != null && qualify) {
            if(group.getCorrelationName() != null) {
                groupName = group.getCorrelationName();
            } else
                AbstractMetadataRecord groupID = group.getMetadataObject();
                if(groupID != null) {             
                    groupName = getName(groupID);
                } else {
                    groupName = group.getName();
                }
            }
        }
       
    String elemShortName = null;       
    AbstractMetadataRecord elementID = obj.getMetadataObject();
        if(elementID != null) {
            elemShortName = getName(elementID);           
        } else {
            String elementName = obj.getName();
            elemShortName = getShortName(elementName);
View Full Code Here


            buffer.append(Tokens.RPAREN);
        }
    }

    public void visit(NamedTable obj) {
      AbstractMetadataRecord groupID = obj.getMetadataObject();
        if(groupID != null) {             
            buffer.append(getName(groupID));
        } else {
            buffer.append(obj.getName());
        }       
View Full Code Here

    }
    TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
    if (tm == null) {
      return;
    }
    AbstractMetadataRecord record = DataTierManagerImpl.getByUuid(tm.getMetadataStore(), uuid);
    if (record != null) {
      record.setProperty(name, value);
    }
  }
View Full Code Here

        TranslationUtility util = new TranslationUtility(getTestVDB());
       
        // Translate command to get some ids
        Select query = (Select) util.parseCommand("select * from partssupplier.parts"); //$NON-NLS-1$
        NamedTable group = (NamedTable) query.getFrom().get(0);
        AbstractMetadataRecord mid = group.getMetadataObject();
        assertEquals("PartsSupplier.PARTSSUPPLIER.PARTS", mid.getFullName()); //$NON-NLS-1$
       
        // Use RMD to get stuff
        assertEquals("PARTS", mid.getNameInSource()); //$NON-NLS-1$
    }
View Full Code Here

        firstTime = false;
      }
      Expression expression = symbol.getExpression();
      if (expression instanceof ColumnReference) {
        Column element = ((ColumnReference) expression).getMetadataObject();
        AbstractMetadataRecord parent = element.getParent();
        Table table;
        if(parent instanceof Table) {
          table = (Table)parent;
        } else {
          parent = parent.getParent();
          if(parent instanceof Table) {
            table = (Table)parent;
          } else {
            throw new TranslatorException("Could not resolve Table for column " + element.getName());
          }
View Full Code Here

    String ldapAttributeName = null;
    String elementNameDirect = e.getName();
    if (elementNameDirect == null) {
    } else {
    }
    AbstractMetadataRecord mdObject = e.getMetadataObject();
    if (mdObject == null) {
      return ""//$NON-NLS-1$
    }
    ldapAttributeName = mdObject.getNameInSource();
    if(ldapAttributeName == null || ldapAttributeName.equals("")) {     //$NON-NLS-1$ 
      ldapAttributeName = mdObject.getName();
      //  If name in source is not set, then fall back to the column name.
    }
    return ldapAttributeName;
  }
View Full Code Here

     * @param container Container reference to be set on the record
     */
    public List<AbstractMetadataRecord> getMetadataRecord(final IEntryResult[] queryResult) {
        final List records = new ArrayList(queryResult.length);
        for (int i = 0; i < queryResult.length; i++) {
            final AbstractMetadataRecord record = getMetadataRecord(queryResult[i].getWord());
            if (record != null) {
                records.add(record);
            }
        }
        return records;
View Full Code Here

    return filteredResult;
    }

    public Object getModelID(final Object groupOrElementID) throws TeiidComponentException, QueryMetadataException {
      ArgCheck.isInstanceOf(AbstractMetadataRecord.class, groupOrElementID);
        AbstractMetadataRecord metadataRecord = (AbstractMetadataRecord) groupOrElementID;
        AbstractMetadataRecord parent = metadataRecord.getParent();
        if (parent instanceof Schema) {
          return parent;
        }
        if (parent == null) {
          throw createInvalidRecordTypeException(groupOrElementID);
        }
        parent = parent.getParent();
        if (parent instanceof Schema) {
          return parent;
        }
      throw createInvalidRecordTypeException(groupOrElementID);
    }
View Full Code Here

      throw createInvalidRecordTypeException(groupOrElementID);
    }

    public String getFullName(final Object metadataID) throws TeiidComponentException, QueryMetadataException {
        ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
        AbstractMetadataRecord metadataRecord = (AbstractMetadataRecord) metadataID;
        return metadataRecord.getFullName();
    }
View Full Code Here

   
    @Override
    public String getName(Object metadataID) throws TeiidComponentException,
        QueryMetadataException {
      ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
        AbstractMetadataRecord metadataRecord = (AbstractMetadataRecord) metadataID;
        return metadataRecord.getName();
    }
View Full Code Here

TOP

Related Classes of org.teiid.metadata.AbstractMetadataRecord$Modifiable

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.