org.teiid.metadata.Table.getName()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(335)

本文整理了Java中org.teiid.metadata.Table.getName()方法的一些代码示例,展示了Table.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getName()方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:getName

Table.getName介绍

暂无

代码示例

代码示例来源:origin: org.teiid.connectors/translator-odata4

  1. private String getName(Table table) {
  2. if (table.getNameInSource() != null) {
  3. return table.getNameInSource();
  4. }
  5. return table.getName();
  6. }

代码示例来源:origin: org.teiid/teiid-engine

  1. public Collection<Table> getXMLTempGroups(Table tableRecord) {
  2. ArrayList<Table> results = new ArrayList<Table>();
  3. String namePrefix = tableRecord.getName() + TransformationMetadata.DELIMITER_STRING;
  4. for (Table table : tableRecord.getParent().getTables().values()) {
  5. if (table.getTableType() == Type.XmlStagingTable && table.getName().startsWith(namePrefix)) {
  6. results.add(table);
  7. }
  8. }
  9. return results;
  10. }

代码示例来源:origin: teiid/teiid

  1. public void addTable(Table table) {
  2. table.setParent(this);
  3. if (this.tables.put(table.getName(), table) != null) {
  4. throw new DuplicateRecordException(DataPlugin.Event.TEIID60013, DataPlugin.Util.gs(DataPlugin.Event.TEIID60013, table.getName()));
  5. }
  6. resolvingOrder.add(table);
  7. }

代码示例来源:origin: org.teiid.connectors/translator-mongodb

  1. public String getId(MongoDocument parent) {
  2. StringBuilder sb = new StringBuilder();
  3. sb.append(parent.getTable().getName());
  4. if (this.parent != null) {
  5. getId(sb);
  6. }
  7. return sb.toString();
  8. }

代码示例来源:origin: org.teiid.connectors/translator-jpa

  1. @Override
  2. public void visit(NamedTable obj) {
  3. if (obj.getCorrelationName() == null) {
  4. String aliasName = "ql_"+this.aliasCounter.getAndIncrement(); //$NON-NLS-1$
  5. this.correlatedName.put(obj.getMetadataObject().getName(), aliasName);
  6. obj.setCorrelationName(aliasName);
  7. }
  8. else {
  9. this.correlatedName.put(obj.getMetadataObject().getName(), obj.getCorrelationName());
  10. }
  11. }

代码示例来源:origin: teiid/teiid

  1. public void setTableMetadata(Table tableMetadata) {
  2. if (tableMetadata != null) {
  3. this.columns = tableMetadata.getColumns();
  4. this.table = new GroupSymbol(tableMetadata.getName());
  5. }
  6. this.tableMetadata = tableMetadata;
  7. }

代码示例来源:origin: org.teiid/teiid-engine

  1. public List<Column> getElementIDsInGroupID(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  2. List<Column> columns = ((Table)groupID).getColumns();
  3. if (columns == null || columns.isEmpty()) {
  4. throw new QueryMetadataException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31071, ((Table)groupID).getName()));
  5. }
  6. return columns;
  7. }

代码示例来源:origin: org.jboss.teiid/teiid-engine

  1. public List<Column> getElementIDsInGroupID(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  2. List<Column> columns = ((Table)groupID).getColumns();
  3. if (columns == null || columns.isEmpty()) {
  4. throw new QueryMetadataException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31071, ((Table)groupID).getName()));
  5. }
  6. return columns;
  7. }

代码示例来源:origin: org.jboss.teiid/teiid-engine

  1. Column getColumn(String columnName, Table table) throws MetadataException {
  2. Column c = table.getColumnByName(columnName);
  3. if (c != null) {
  4. return c;
  5. }
  6. throw new MetadataException(QueryPlugin.Util.getString("SQLParser.no_column", columnName, table.getName())); //$NON-NLS-1$
  7. }

代码示例来源:origin: org.teiid/teiid-engine

  1. Column getColumn(String columnName, Table table) throws MetadataException {
  2. Column c = table.getColumnByName(columnName);
  3. if (c != null) {
  4. return c;
  5. }
  6. throw new MetadataException(QueryPlugin.Util.getString("SQLParser.no_column", columnName, table.getName())); //$NON-NLS-1$
  7. }

代码示例来源:origin: teiid/teiid

  1. Column getColumn(String columnName, Table table) throws MetadataException {
  2. Column c = table.getColumnByName(columnName);
  3. if (c != null) {
  4. return c;
  5. }
  6. throw new MetadataException(QueryPlugin.Util.getString("SQLParser.no_column", columnName, table.getName())); //$NON-NLS-1$
  7. }

代码示例来源:origin: org.jboss.teiid/teiid-engine

  1. public void tableModified(Table table) {
  2. if (!assertInEditMode(Mode.SCHEMA)) {
  3. return;
  4. }
  5. assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.TABLE, table);
  6. verifyTableExists(table.getName());
  7. }

代码示例来源:origin: org.teiid.connectors/translator-mongodb

  1. public boolean merges(MongoDocument right) throws TranslatorException {
  2. if (equals(right)) {
  3. return false;
  4. }
  5. if (right.isMerged()) {
  6. if (right.mergeKey.getParentTable().equals(getTable().getName())) {
  7. return true;
  8. }
  9. }
  10. return nestedMerge(right);
  11. }

代码示例来源:origin: org.teiid.connectors/translator-mongodb

  1. public MongoDocument(Table table, RuntimeMetadata metadata) throws TranslatorException {
  2. this.table = table;
  3. this.metadata = metadata;
  4. if (isEmbeddable() && isMerged()) {
  5. throw new TranslatorException(MongoDBPlugin.Util.gs(MongoDBPlugin.Event.TEIID18013, table.getName()));
  6. }
  7. build();
  8. }

代码示例来源:origin: org.teiid.connectors/translator-mongodb

  1. public Table getTargetTable() throws TranslatorException {
  2. if (isMerged()) {
  3. Table merge = getMergeTable();
  4. MongoDocument mergeDoc = getDocument(merge.getName());
  5. if (mergeDoc.isMerged()) {
  6. return mergeDoc.getTargetTable();
  7. }
  8. return merge;
  9. }
  10. return getTable();
  11. }

代码示例来源:origin: org.teiid.connectors/translator-mongodb

  1. private void buildForeignKeyReferences() throws TranslatorException {
  2. for (ForeignKey fk:this.table.getForeignKeys()) {
  3. MergeDetails key = new MergeDetails(this);
  4. key.setParentTable(fk.getReferenceTableName());
  5. key.setEmbeddedTable(this.table.getName());
  6. key.setName(fk.getName());
  7. key.setColumns(MongoDBSelectVisitor.getColumnNames(fk.getColumns()));
  8. key.setReferenceColumns(fk.getReferenceColumns());
  9. this.foreignKeys.put(MongoDBSelectVisitor.getColumnNames(fk.getColumns()), key);
  10. }
  11. }

代码示例来源:origin: teiid/teiid

  1. @Test
  2. public void testReferenceTableName() {
  3. Table table = Mockito.mock(Table.class);
  4. Mockito.stub(table.getName()).toReturn("table"); //$NON-NLS-1$
  5. KeyRecord pk = Mockito.mock(KeyRecord.class);
  6. Mockito.stub(pk.getParent()).toReturn(table);
  7. ForeignKey fk = new ForeignKey();
  8. fk.setPrimaryKey(pk);
  9. assertEquals("table", fk.getReferenceTableName()); //$NON-NLS-1$
  10. }
  11. }

代码示例来源:origin: org.jboss.teiid/teiid-engine

  1. @Override
  2. public void visit(AlterView obj) {
  3. Table t = (Table)obj.getTarget().getMetadataID();
  4. String sql = obj.getDefinition().toString();
  5. if (getMetadataRepository(vdb, t.getParent().getName()) != null) {
  6. getMetadataRepository(vdb, t.getParent().getName()).setViewDefinition(workContext.getVdbName(), workContext.getVdbVersion(), t, sql);
  7. }
  8. alterView(vdb, t, sql, false);
  9. if (pdm.getEventDistributor() != null) {
  10. pdm.getEventDistributor().setViewDefinition(workContext.getVdbName(), workContext.getVdbVersion(), t.getParent().getName(), t.getName(), sql);
  11. }
  12. }

代码示例来源:origin: org.teiid/teiid-engine

  1. @Override
  2. public void visit(AlterView obj) {
  3. Table t = (Table)obj.getTarget().getMetadataID();
  4. String sql = obj.getDefinition().toString();
  5. if (getMetadataRepository(vdb, t.getParent().getName()) != null) {
  6. getMetadataRepository(vdb, t.getParent().getName()).setViewDefinition(workContext.getVdbName(), workContext.getVdbVersion(), t, sql);
  7. }
  8. alterView(vdb, t, sql, false);
  9. if (pdm.getEventDistributor() != null) {
  10. pdm.getEventDistributor().setViewDefinition(workContext.getVdbName(), workContext.getVdbVersion(), t.getParent().getName(), t.getName(), sql);
  11. }
  12. }

代码示例来源:origin: teiid/teiid

  1. @Override
  2. public void visit(AlterView obj) {
  3. Table t = (Table)obj.getTarget().getMetadataID();
  4. String sql = obj.getDefinition().toString();
  5. if (getMetadataRepository(vdb, t.getParent().getName()) != null) {
  6. getMetadataRepository(vdb, t.getParent().getName()).setViewDefinition(workContext.getVdbName(), workContext.getVdbVersion(), t, sql);
  7. }
  8. alterView(vdb, t, sql, false);
  9. if (pdm.getEventDistributor() != null) {
  10. pdm.getEventDistributor().setViewDefinition(workContext.getVdbName(), workContext.getVdbVersion(), t.getParent().getName(), t.getName(), sql);
  11. }
  12. }

相关文章